Environment is in domain, server is Windows Server 2003, workstations have Vista and XP installed.
I need the way to check remotely who is currently logged on workstation, preferably from some simple command line and without sysinternals or third party programs.
Thanks
This was the original source but that is now 404 :
They suggested using the (Windows Management Interface Command) WMIC which available on windows :
Will return the username currently logged into xxx.xxx.xxx.xxx, or
will return the username currently logged into "workstation_name"
UPDATE: This should working on Windows 10 too - if you are an admin on the remote machine.
Sorry, did not notice you do not want to use Sysinternals.
That is now a Microsoft technet tool, any specific reason to not use it?
I have preferred Sysinternals over other third party tools before Mark Russinovich moved into Microsoft.
The Microsoft Sysinternals Suite has a tool called Psloggedon,
There is also NBTSTAT,
I've used win32_loggedonuser, but ran into an issue where more than one domain user was returned, so it didn't work for my purposes. Instead I used (In powershell)
the if is because sometimes getowner will report more than one user for some reason, don't know why but in my case it was the same user so it wasn't an issue.
You can get this info from win32_loggedonuser.
From this page: