I've used quser before to query users on the local server. I noticed today that it has an option for querying a remote server. However, when I tried it, I keep getting the following error:
C:\Users\nimmylebby>quser administrator /SERVER:remote_server
Error 0x00000005 enumerating sessionnames
Error [5]:Access is denied.
I'm assuming it's because I do not provide a password? But I do not see an option to provide password. Here is the help doc:
C:\Users\nimmylebby>quser /?
Display information about users logged on to the system.
QUERY USER [username | sessionname | sessionid] [/SERVER:servername]
username Identifies the username.
sessionname Identifies the session named sessionname.
sessionid Identifies the session with ID sessionid.
/SERVER:servername The server to be queried (default is current).
Perhaps I'm misunderstanding the quser command? Is there a more appropriate command for this?
Best Answer
Are you querying to find out if the user named administrator has a session on the remote server?
Is the account under which you're running quser a domain admin or a local admin of the remote server?