Microsoft DOS logoff command
Updated: 09/15/2017 by Computer Hope
About logoff
The logoff command is an external command that allows a user to quickly logoff their computer from the command line or within a batch file.
Availability
The logoff command is an external command that is available in the below Microsoft operating systems as logoff.exe.
Windows 2000
Windows XP
Windows 7
Windows 8
Windows 10
Logoff syntax
Windows Vista and later syntax
LOGOFF [sessionname | sessionid] [/SERVER:servername] [/V] [/VM]
sessionname | The name of the session. |
sessionid | The ID of the session. |
/SERVER:servername | Specifies the Terminal server containing the user session to log off (default is current). |
/V | Displays information about the actions performed. |
/VM | Logs off a session on server or within virtual machine. The unique ID of the session needs to be specified. |
Windows XP and earlier syntax
LOGOFF [sessionname | sessionid] [/SERVER:servername] [/V]
sessionname | The name of the session. |
sessionid | The ID of the session. |
/SERVER:servername | Specifies the Terminal server containing the user session to log off (default is current). |
/V | Displays information about the actions performed. |
Logoff Examples
logoff
Would immediately log off the profile currently logged into Windows.
Note: Running this command does not prompt you if you're sure you want to logoff.
Additional information
- See our logoff definition for further information and related links on this term.