By Request VBS Script Query User Terminal Server

 

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

 

 

 

Published Monday, December 22, 2008 9:36 AM by dhite
Filed under:

Comments

No Comments