Microsoft DOS logoff command
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.
The logon command is an external command that is available in the below Microsoft operating systems.
Terminates a session.
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.|
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.