Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find users logged on with Terminal Server sessions?

Status
Not open for further replies.

humbletech99

Programmer
Nov 22, 2005
155
GB
I am trying to find a way to enumerate all the logged on users on Windows systems. I have used WMI to find the local user session if there is one on any windows machine, but I also want to find any users logged on via Terminal sessions on Windows 2003 Terminal Servers.

I have also used WMI to get all the users who have sessions open, but this includes people who've just used a file share like \\server\share\filename.ext.

Does anyone know how I can programmatically (or via cmd) find out the users that have Terminal Server Sessions?
 
no I don't want the session id, I want the list of usernames and all the 2 line vbs/wsh is doing is expanding an environment variable, not enumerating all users.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top