To get the names of users that are logged into a machine via Powershell, use this:
query user
To query another machine, use this whilst replacing the #'s with the machine number that you wish to query:
query user /server:#######
The results will show the usernames of those who are logged into the machine as well as who is currently active.
Top comments (0)