logoff

Windows CMD · Users and permissions · reference only

What it does

Logs off a user session, the current one or one with a given ID, on the local computer or a remote one.

Syntax

logoff [nombre_sesión | id_sesión] [/server:equipo] [/v]

Options and parameters

  • (sin argumentos)

    Logs off the current session.

  • id_sesión

    Logs off the session with that ID; you can see it with quser.

  • /server:equipo

    Logs off a session on a remote computer.

  • /v

    Shows information about the actions it performs.

Usage examples

  • logoff

    Logs off your current session.

  • quser

    Before logging off someone else's session, look up its ID.

  • logoff 2

    Logs off the session with ID 2.

  • logoff 2 /server:SRV01 /v

    Logs off session 2 on the SRV01 server showing details.

Notes and common mistakes

  • Programs open in the session are closed and unsaved work can be lost.

Related commands