Windows 10 logoff command

LOGOFF – завершение сеанса пользователя Windows .

Команда MODE используется для завершения сеанса пользователя (выхода из Windows). Формат командной строки:

LOGOFF [имя сеанса | ИД сеанса] [/SERVER:сервер] [/V] [/VM]

Параметры командной строки:

имя сеанса — Имя сеанса.

ID сеанса — Идентификатор сеанса.

/SERVER:сервер — Сервер удаленных рабочих столов, содержащий пользователя пользователя (по умолчанию — текущий).

/V — Отображение информации о выполненных действиях.

/VM — Завершение сеанса на сервере или в виртуальной машине. Необходимо указать уникальный идентификатор сеанса.

LOGOFF /? — отобразить справку по использованию.

logoff — завершить текущий сеанс пользователя (выйти из системы).

logoff rdp-tcp#3 /server:COMP10 — завершить сеанс с именем rdp-tcp#3 на сервере COMP10 . Имя сеанса можно определить командой QUSER /server:COMP10 .

logoff 2 /server:COMP10 — завершить сеанс с идентификатором 2 на сервере COMP10

logoff 2 /server:192.168.1.110 — то же, что и в предыдущем примере, но вместо имени сервера используется его IP-адрес.

logoff 2 /server:192.168.1.110 /V — использовать подробный режим отображения сведений о выполняемых действиях. В этом случае на экран выводится сообщение:

Будет выполнен выход user (сеанс 2) из системы ,
продолжить (n=нет)?n

Отображается не только идентификатор сеанса, но и имя пользователя. В этом режиме, завершение сеанса можно отменить, ответив n на запрос продолжить (n=нет)?n . По умолчанию, отмена завершения сеанса не выполняется.

В качестве альтернативы команде logoff можно использовать команду SHUTDOWN с параметром -l

Windows : logoff from command line

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 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.

To logoff on the current system

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

Читайте также:  Download iso windows starter

How to force logoff without waiting for user confirmation to terminate the running applications?

The above commands do forced logoffs.В They kill all the applications one by one and at the end logs off the user.

If I want to login from command line, how do I set it up?

Open Task manager, click on Users, Right Click, manage user account, it will open control panel. It the path above, open cmd from here. shutdown -l to log out.
Login again. It works.

need to logoff but cannot

i need to log out from anther user with the user name
sameing like that…
logoff username:moss /server:172.19.19.50

logoff

Applies to: Windows Server (Semi-Annual Channel), Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Logs off a user from a session on a Remote Desktop Session Host server and deletes the session.

Syntax

Parameters

Parameter Description
Specifies the name of the session. This must be an active session.
Specifies the numeric ID which identifies the session to the server.
/server: Specifies the Remote Desktop Session Host server that contains the session whose user you want to log off. If unspecified, the server on which you are currently active is used.
/v Displays information about the actions being performed.
/? Displays help at the command prompt.

Remarks

You can always log off yourself from the session to which you are currently logged on. You must, however, have Full Control permission to log off users from other sessions.

Logging off a user from a session without warning can result in loss of data at the user’s session. You should send a message to the user by using the msg command to warn the user before taking this action.

If or isn’t specified, logoff logs the user off from the current session.

After you log off a user, all processes end and the session is deleted from the server.

You can’t log off a user from the console session.

Examples

To log off a user from the current session, type:

To log off a user from a session by using the session’s ID, for example session 12, type:

To log off a user from a session by using the name of the session and server, for example session TERM04 on Server1, type:

How to log off on windows 10 by using cmd?

What is the cmd-command for log off and shut down computer?

Would appreciate any help.

***Post moved by the moderator to the appropriate forum category.***

Replies (2) 

There are a lot of command line in CMD you can use to logoff a computer. When you type the command «shutdown /» in CMD, it will show you the list of command controls you can use with it as for your options. With what you have stated, «shutdown /l» with the letter «L» meaning logoff, would be the most appropriate.

Let us know if this answers your question.

25 people found this reply helpful

Was this reply helpful?

Sorry this didn’t help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

We have noticed that the post has been inactive for quite some time. We’d like to check if Nick Dich was able to answer your question.

If so, we highly encourage you to inform our Community by clicking on Yes or marking the post as an answer. This will help other members who may have the same issue as you. Otherwise, don’t hesitate to update us so we can further assist you.

13 people found this reply helpful

Was this reply helpful?

Sorry this didn’t help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

logoff logoff

Область применения: Windows Server (половина ежегодного канала), Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012 Applies to: Windows Server (Semi-Annual Channel), Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Выполнит выход пользователя из сеанса на удаленный рабочий стол сервере узла сеансов и удалит сеанс. Logs off a user from a session on a Remote Desktop Session Host server and deletes the session.

Синтаксис Syntax

Параметры Parameters

Параметр Parameter Описание Description
Указывает имя сеанса. Specifies the name of the session. Это должен быть активный сеанс. This must be an active session.
Указывает числовой идентификатор, определяющий сеанс на сервере. Specifies the numeric ID which identifies the session to the server.
/server: /server: Указывает сервер узла сеансов удаленный рабочий стол, содержащий сеанс, для которого пользователь должен выйти из системы. Specifies the Remote Desktop Session Host server that contains the session whose user you want to log off. Если не указано, используется сервер, на котором активна в данный момент. If unspecified, the server on which you are currently active is used.
/v /v Отображает сведения о выполняемых действиях. Displays information about the actions being performed.
/? /? Отображение справки в командной строке. Displays help at the command prompt.

Комментарии Remarks

Вы всегда можете выйти из сеанса, к которому в данный момент выполнен вход. You can always log off yourself from the session to which you are currently logged on. Однако необходимо иметь разрешение « полный доступ» для выхода пользователей из других сеансов. You must, however, have Full Control permission to log off users from other sessions.

Выход пользователя из сеанса без предупреждения может привести к утрате данных в сеансе пользователя. Logging off a user from a session without warning can result in loss of data at the user’s session. Необходимо отправить пользователю сообщение с помощью команды MSG , чтобы предупредить пользователя перед выполнением этого действия. You should send a message to the user by using the msg command to warn the user before taking this action.

Если параметр или не указан, функция выхода из системы выполняет выход пользователя из текущего сеанса. If or isn’t specified, logoff logs the user off from the current session.

После выхода пользователя из системы все процессы завершаются, а сеанс удаляется с сервера. After you log off a user, all processes end and the session is deleted from the server.

Пользователь не может выйти из сеанса консоли. You can’t log off a user from the console session.

Примеры Examples

Для выхода пользователя из текущего сеанса введите: To log off a user from the current session, type:

Для выхода пользователя из сеанса с помощью идентификатора сеанса, например сеанса 12, введите: To log off a user from a session by using the session’s ID, for example session 12, type:

Для выхода пользователя из сеанса с использованием имени сеанса и сервера, например Session TERM04 на сервере Server1, введите: To log off a user from a session by using the name of the session and server, for example session TERM04 on Server1, type:

Читайте также:  Как создать многостраничный файл pdf mac os
Оцените статью