Remote Log Off

S

Steve Williams

Does anyone know how to remote force a log off to one,
many, all users???? Seems everyone fails to log off
since they believe that they are already logged off
because of the password protected screen saver (Sigh) I
can't use win exit because I need the functionality of
the screen saver?? Any suggestions?? Third party solution
welcome???
 
S

Steve Wiolliams

Thanks frank.. I tried you suggestion.. And if I have and
hour to review a video it would be a great link.

Anyone else... I am trying to force a LOG OFF (NOT
terminal service) to client pcs who fail to log off the
their PC (Windows XP Client)

I am trying to runa script using shutdown /l /f, but for
some reason outlook hangs the process?? Any way to kill
outlook?
 
M

Matjaz Ladava [MVP]

Try this code. Change "." in computer name to a remote computer name ("." is local computer)


strComputer= "."
Set objWMI = GetObject("winmgmts:{(Shutdown)}\\" + strComputer + "\root\cimv2")
Set colOperatingSystems = objWMI.ExecQuery("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
ObjOperatingSystem.Win32Shutdown(0)
Next

Sva this text in .vbs and run it.

--
Regards

Matjaz Ladava, MCSE (NT4 & 2000), MVP
(e-mail address removed)
http://ladava.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top