/build/static/layout/Breadcrumb_cap_w.png

Alternative of '$RunAsActiveUser' variable in PSAppDeployToolkit?

There is a variable called "$RunAsActiveUser" in PS AppDeployToolkit. 
It's purpose is : 
"$RunAsActiveUser" : The active console user. If no console user exists but users are logged in, such as on terminal servers, then the first logged-in non-console user.

But I am not using the Toolkit. So, Is there any way by which this can be implemented using normal Powershell?

Thanks in advance.

0 Comments   [ + ] Show comments

Answers (1)

Posted by: jakesong615@163.com 6 years ago
White Belt
0

you can use 'Get-WmiObject –ComputerName CLIENT1 –Class Win32_ComputerSystem | Select-Object UserName'

command to get the logon user on local or remote computer.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ