shutdown
Enables you to shut down or restart local or remote computers, one at a time.
Syntax
Parameters
Parameter | Description |
---|---|
/i | Displays the Remote Shutdown box. The /i option must be the first parameter following the command. If /i is specified, all other options are ignored. |
/l | Logs off the current user immediately, with no time-out period. You cannot use /l with /m or /t. |
/s | Shuts down the computer. |
/sg | Shuts down the computer. On the next boot, if Automatic Restart Sign-On is enabled, the device automatically signs in and locks based on the last interactive user. After sign in, it restarts any registered applications. |
/r | Restarts the computer after shutdown. |
/g | Shuts down the computer. On the next restart, if Automatic Restart Sign-On is enabled, the device automatically signs in and locks based on the last interactive user. After sign in, it restarts any registered applications. |
/a | Aborts a system shutdown. Effective only during the time-out period. To use /a, you must also use the /m option. |
/p | Turns off the local computer only (not a remote computer)—with no time-out period or warning. You can use /p only with /d or /f. If your computer doesn’t support power-off functionality, it will shut down when you use /p, but the power to the computer will remain on. |
/h | Puts the local computer into hibernation, if hibernation is enabled. You can use /h only with /f. |
hybrid | Shuts down the device and prepares it for fast startup. This option must be used with the /s option. |
/fw | Combining this option with a shutdown option causes the next restart to go to the firmware user interface. |
/e | Enables you to document the reason for the unexpected shutdown on the target computer. |
/o | Goes to the Advanced boot options menu and restarts the device. This option must be used with the /r option. |
/f | Forces running applications to close without warning users. Caution: Using the /f option might result in loss of unsaved data. |
/m \\ | Specifies the target computer. Can’t be used with the /l option. |
/t | Sets the time-out period before shutdown to xxx seconds. The valid range is 0-315360000 (10 years), with a default of 30. If the timeout period is greater than 0, the /f parameter is implied. |
/d [p | u:] : | Lists the reason for the system restart or shutdown. The supported parameter values are:
|
NOTE
If p or u aren’t specified, the restart or shutdown is unplanned.
Remarks
Users must be assigned the Shut down the system user right to shut down a local or remotely administered computer that is using the shutdown command.
Users must be members of the Administrators group to annotate an unexpected shutdown of a local or remotely administered computer. If the target computer is joined to a domain, members of the Domain Admins group might be able to perform this procedure. For more information, see:
If you want to shut down more than one computer at a time, you can call shutdown for each computer by using a script, or you can use shutdown /i to display the Remote Shutdown box.
If you specify major and minor reason codes, you must first define these reason codes on each computer where you plan to use the reasons. If the reason codes aren’t defined on the target computer, Shutdown Event Tracker can’t log the correct reason text.
Remember to indicate that a shutdown is planned by using the p parameter. Not using the p parameter, indicates that the shutdown was unplanned.
Using the p parameter, along the reason code for an unplanned shutdown, causes the shutdown to fail.
Not using the p parameter, and only providing the reason code for an planned shutdown, also causes the shutdown to fail
Examples
To force apps to close and to restart the local computer after a one-minute delay, with the reason Application: Maintenance (Planned) and the comment «Reconfiguring myapp.exe», type:
To restart the remote computer myremoteserver with the same parameters as the previous example, type:
shutdown shutdown
Позволяет выключать или перезагружать локальные или удаленные компьютеры по одному за раз. Enables you to shut down or restart local or remote computers, one at a time.
Синтаксис Syntax
Параметры Parameters
Параметр Parameter | Описание Description |
---|---|
/i /i | Отображает поле Remote Shutdown (удаленное завершение работы ). Displays the Remote Shutdown box. Параметр /i должен быть первым параметром после команды. The /i option must be the first parameter following the command. Если указан параметр /i , все остальные параметры игнорируются. If /i is specified, all other options are ignored. |
/l /l | Немедленное отключение текущего пользователя без периода ожидания. Logs off the current user immediately, with no time-out period. Параметр /l нельзя использовать с параметрами/m и /t. You cannot use /l with /m or /t. |
/s /s | Завершает работу компьютера. Shuts down the computer. |
/сг /sg | Завершает работу компьютера. Shuts down the computer. При следующей загрузке, если включен Автоматический вход в систему , устройство автоматически подписывается и блокируется на основе последнего интерактивного пользователя. On the next boot, if Automatic Restart Sign-On is enabled, the device automatically signs in and locks based on the last interactive user. После входа в систему перезапускаются все зарегистрированные приложения. After sign in, it restarts any registered applications. |
/r /r | Перезапускает компьютер после завершения работы. Restarts the computer after shutdown. |
/g /g | Завершает работу компьютера. Shuts down the computer. При следующей перезагрузке, если включен Автоматический вход в систему , устройство автоматически подписывается и блокируется на основе последнего интерактивного пользователя. On the next restart, if Automatic Restart Sign-On is enabled, the device automatically signs in and locks based on the last interactive user. После входа в систему перезапускаются все зарегистрированные приложения. After sign in, it restarts any registered applications. |
/a /a | Прерывает завершение работы системы. Aborts a system shutdown. Действует только в течение периода ожидания. Effective only during the time-out period. Чтобы использовать /a, необходимо также использовать параметр /m . To use /a, you must also use the /m option. |
/p /p | Отключает только локальный компьютер (не удаленный компьютер), без времени ожидания или предупреждения. Turns off the local computer only (not a remote computer)—with no time-out period or warning. Параметр /p можно использовать только с параметрами /d или /f. You can use /p only with /d or /f. Если компьютер не поддерживает функции выключения питания, он будет выключен при использовании /p, но питание компьютера останется включенным. If your computer doesn’t support power-off functionality, it will shut down when you use /p, but the power to the computer will remain on. |
/h /h | Перевод локального компьютера в режим гибернации, если включен режим гибернации. Puts the local computer into hibernation, if hibernation is enabled. Параметр /h можно использовать только с параметром /f. You can use /h only with /f. |
гибридные hybrid | Завершает работу устройства и готовит его к быстрому запуску. Shuts down the device and prepares it for fast startup. Этот параметр следует использовать с параметром /s . This option must be used with the /s option. |
/фв /fw | Объединение этого параметра с параметром завершения работы приводит к тому, что Следующая перезагрузка переходит к пользовательскому интерфейсу встроенного по. Combining this option with a shutdown option causes the next restart to go to the firmware user interface. |
/e /e | Позволяет документировать причину неожиданного завершения работы на целевом компьютере. Enables you to document the reason for the unexpected shutdown on the target computer. |
/o /o | Переход в меню дополнительных параметров загрузки и перезагрузка устройства. Goes to the Advanced boot options menu and restarts the device. Этот параметр следует использовать с параметром /r . This option must be used with the /r option. |
/f /f | Принудительно закрывает выполнение приложений без предупреждения пользователей. Forces running applications to close without warning users. Внимание! Использование параметра /f может привести к утрате несохраненных данных. Caution: Using the /f option might result in loss of unsaved data. |
/m \\ /m \\ | Указывает целевой компьютер. Specifies the target computer. Не может использоваться с параметром /l . Can’t be used with the /l option. |
/t /t | Задает время ожидания до завершения работы в xxx секунд. Sets the time-out period before shutdown to xxx seconds. Допустимый диапазон — 0-315360000 (10 лет) и значение по умолчанию 30. The valid range is 0-315360000 (10 years), with a default of 30. Если время ожидания больше 0, подразумевается параметр /f . If the timeout period is greater than 0, the /f parameter is implied. |
/d [p | u:] : /d [p | u:] : | Список причин перезапуска или завершения работы системы. Lists the reason for the system restart or shutdown. Поддерживаемые значения параметров: The supported parameter values are:
|
ПРИМЕЧАНИЕ.NOTE
Если значение p или u не указано, то перезагрузка или завершение работы не планируется. If p or u aren’t specified, the restart or shutdown is unplanned.
Комментарии Remarks
Пользователям должно быть назначено право » Завершение работы системы» для завершения работы локального или удаленного администрирования компьютера, использующего команду Shutdown . Users must be assigned the Shut down the system user right to shut down a local or remotely administered computer that is using the shutdown command.
Пользователи должны быть членами группы » Администраторы «, чтобы закомментировать неожиданное завершение работы локального или удаленного администрирования компьютера. Users must be members of the Administrators group to annotate an unexpected shutdown of a local or remotely administered computer. Если конечный компьютер присоединен к домену, эту процедуру могут выполнять члены группы «Администраторы домена» . If the target computer is joined to a domain, members of the Domain Admins group might be able to perform this procedure. Дополнительные сведения см. в разделе: For more information, see:
Если вы хотите завершить работу несколько компьютеров одновременно, можно вызвать Завершение работы для каждого компьютера с помощью сценария или завершить работу /I , чтобы отобразить поле удаленное завершение работы . If you want to shut down more than one computer at a time, you can call shutdown for each computer by using a script, or you can use shutdown /i to display the Remote Shutdown box.
Если указываются коды основных и вспомогательных причин, необходимо сначала определить эти коды на каждом компьютере, где планируется использовать причины. If you specify major and minor reason codes, you must first define these reason codes on each computer where you plan to use the reasons. Если коды причин не определены на целевом компьютере, средство регистрации событий завершения работы не сможет зарегистрировать правильный текст причины. If the reason codes aren’t defined on the target computer, Shutdown Event Tracker can’t log the correct reason text.
Не забудьте указать, что завершение работы запланировано с помощью параметра p . Remember to indicate that a shutdown is planned by using the p parameter. Если параметр p не используется, указывает, что завершение работы было незапланированным. Not using the p parameter, indicates that the shutdown was unplanned.
Использование параметра p , а также кода причины незапланированного отключения приводит к сбою завершения работы. Using the p parameter, along the reason code for an unplanned shutdown, causes the shutdown to fail.
Если параметр p не используется и указан только код причины для запланированного завершения работы, также происходит сбой завершения работы. Not using the p parameter, and only providing the reason code for an planned shutdown, also causes the shutdown to fail
Примеры Examples
Чтобы принудительно закрыть приложения и перезапустить локальный компьютер по истечении одной минуты, по причине приложения: обслуживание (запланированное) и комментарий «перенастройка myapp.exe», введите: To force apps to close and to restart the local computer after a one-minute delay, with the reason Application: Maintenance (Planned) and the comment «Reconfiguring myapp.exe», type:
Чтобы перезагрузить удаленный компьютер миремотесервер с теми же параметрами, что и в предыдущем примере, введите: To restart the remote computer myremoteserver with the same parameters as the previous example, type: