What is logged on remote machine

Simple command that displays locally logged users on remote machine:
psloggedon -l \\%1
This will show only locally users without any cached account:
psloggedon -l \\%1 | find /v "unknown"
This will output just the domain-name\username
for /f "tokens=3" %%a in ('%~dp0psloggedon.exe /accepteula -l \\%1 ^| find /v "unknown"') do (
echo %%a
)
Replace %1 with remote computername.

Related files:

No comments: