Windows : logoff from command line

by admin on November 25, 2010

We can logoff a user session by clicking on the Logoff button in the start menu. We can logoff from command prompt(CMD) too using shutdown command. You need to run the below command.

Shutdown -L

Shutdown is a Windows in-built command. We don’t have to install it separately. Note that we can run this command from windows Run window also. This command works on all windows editions. (XP, Vista, Server 2k3/2k8, Windows 7)

There’s another command Logoff  which also serves the same purpose. This command can be used to logoff sessions on the remote computers also. Find syntax below for this.

logoff /server:remote_computer_name

This does not accept user name and passwords so it uses the credentials of the current logged in user on the host system.

{ 0 comments… add one now }

Leave a Comment

Previous post:

Next post: