Remote logoff

matrix2008

Beta member
Messages
3
My main goal is to force a user on my network to logoff without them having to do anything. Ive done some research and it seems like in Vista it might not be do-able w/o third party software. The closet ive goten is to use PsExec to start a remote cmd prompt in the remote computer and do "shutdown /l". But when i do this it returns a "(computername): Incorrect function. (1)" any ideas?
 
Instead of opening a command window and pushing a command, try just the command:

psexec \\<computer_name> shutdown.exe -l
 
C:\Windows\system32>psexec \\<computer> shutdown.exe -l
PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com

<computer>: Incorrect function.(1)
shutdown.exe exited on <computer> with error code 1.


:annoyed:
 
Reboot worked, but log off didn't. I know the shutdown.exe has a built-in remote computer option... but you can't use -l with it, only reboot (-r) and shutdown (-s). PSExec is probably interfering with that, I'm guessing.

Does it have to be a logoff, and not a reboot? Because if you could do a reboot, you wouldn't even need PSExec. Could just do:
shutdown -r -t xx -m \\<computer>

Where xx is a time in seconds before reboot.
 
The main goal was for a logoff and the reason i was using PsExec was due to its @file function. I was looking to use it to push updates that wont push to the computer unless the users are logged off and most of them dont logoff at night. We have been using a rebot to get the same effect. Just wanted to see if there was a diffrent way to do it.
 
You could maybe just make a batch file on a shared location, and run the batch file with PSExec from the share location to force logoff, and then run the rest of your PSExec commands that way maybe?
 
If you have to logoff a bunch of computers at once, doing it the GUI way would take a lot of time.
 
Back
Top Bottom