How To Logoff From Command Line In Windows?

Windows operating system is GUI based but provides some commands for administrative jobs. logoff command is one of them and used with command line. Logoff command have very little options and features. We will look these usage type of logoff command below.


Help about logoff command can be listed with /? option like below.

$ logoff /?


We can use logoff command without providing any option or parameter. This will logoff current session.

$ logoff

Logoff With Session ID or Name

In a computer there may be more than one session. One of the sessions can be specified to log off. How can we specify session name? Like  below. In this example we specify session id 2 to logoff.

$ logoff 2

Print Actions While Logoff

Verbose information about the logoff action can be printed with the /v option.

$ logoff /V

Logoff Session In the Remote Computer

Another useful feature of the logoff command is logoff remote system. We will provide the remote system IP address or domain name after the command like below.

$ logoff \\myserver

LEARN MORE  Remote Desktop Connection Manager (RDCMan) Tutorial

Leave a Comment