This By Request VBS script is provided as an example of how to query the user(s) logged onto a remote terminal server.
VBS Script:
strComputer = InputBox("Enter Terminal Server Name")
Set objShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
strCommand = "Query User /Server:" & strComputer
objShell.Run("%Comspec% /K ") & strCommand,1,True
No Comments