Type one of the following commands in a command window:
query session /counter
or
query user find "rdp-tcp#" find /c " Active "
If you are running Windows 2003 on your TS, you can also use the following script
(save it as SessionCount.vbs):
Set obji = GetObject("winmgmts:{impersonationLevel=impersonate}!Win32_Service='TermService'")
wscript.echo "Total sessions: " & obji.TotalSessions
wscript.echo "Disconnected sessions: " & obji.DisconnectedSessions
Run the script from a command prompt with:
cscript SessionCount.vbs
query session /counter
or
query user find "rdp-tcp#" find /c " Active "
If you are running Windows 2003 on your TS, you can also use the following script
(save it as SessionCount.vbs):
Set obji = GetObject("winmgmts:{impersonationLevel=impersonate}!Win32_Service='TermService'")
wscript.echo "Total sessions: " & obji.TotalSessions
wscript.echo "Disconnected sessions: " & obji.DisconnectedSessions
Run the script from a command prompt with:
cscript SessionCount.vbs
0 comments:
Post a Comment