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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Thin Client log off at Terminal Server Log off

Status
Not open for further replies.

GeoDM

Technical User
Dec 16, 2003
66
US
I snagged this script from another forum:

Set OpSysSet = GetObject("winmgmts:{(Shutdown)}//./root/cimv2").ExecQuery("select * from Win32_OperatingSystem where Primary=true")

for each OpSys in OpSysSet

OpSys.Reboot()

next

My goal is to when a user logs off a Terminal Server it also logs off the Thin Client they are using.

Any suggestions would be great! Thanks!
 
I think you would need to use some imagination with your code and send the logoff commands to both systems at the same time.

what do you have so far to be able to grab the thin client computer name?

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
How about using the shutdown.exe /l as a bat file. Is there a way to trigger it when logging off Terminal Server?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top