Forcing a remote logoff

Written by on Thursday, January 3, 2008 5:13 - 0 Comments

How to force a user to log off of a remote machine

Bob logs onto his workstation and you (who are on another workstation) want to force Bob to log off. How can you do that?
You could do it using Computer Management. Open Computer Management on your machine and connect to Bob’s computer, then right-click on Bob’s computer and select Properties. Switch to the Advanced tab, and click Settings under Startup And Recovery options. Now go to Shutdown and under Action click Log Off Current User and then OK.

Of course some things are easier to do using a script:

strComputer = “”
Set objWMIService = GetObject(“winmgmts:” & “{impersonationLevel=impersonate}!\” & strComputer & “rootcimv2”)
Set colOperatingSystems = objWMIService.ExecQuery (“SELECT * FROM Win32_OperatingSystem”)
For Each objOperatingSystem in colOperatingSystems
ObjOperatingSystem.Win32Shutdown(0)
Next

Article written by MyComputerAid.com



Comments are closed.

Ad Sponsor







Sponsors

2003 server - Sep 30, 2008 22:34 - 0 Comments

instant messaging srv records

More In Computers & PC


Microsoft Outlook - Mar 22, 2009 11:22 - 0 Comments

Outlook: Duplicates in Mailbox

More In Computers & PC


Microsoft Desktop, Web browsers and Internet, Windows 2000, Windows 7, Windows 98, Windows Firewall and networking, Windows Vista, Windows XP - Feb 8, 2010 18:09 - 0 Comments

Disable Proxy settings in IE

More In Computers & PC