/build/static/layout/Breadcrumb_cap_w.png
05/17/2017 904 views
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

Comments


All Answers

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.

Answered 03/08/2018 by: jakesong615@163.com
White Belt