System command

shutdown command

Shut down, restart, sign out or schedule a system action.

Availability: Microsoft Learn command reference spanning Windows client and Windows Server releases; some entries are legacy, role-specific, optional-feature or interactive subcommands.中文

Documented syntax

shutdown [/i | /l | /s | /sg | /r | /g | /a | /p | /h | /e | /o] [/hybrid] [/fw] [/f] [/m \\computer][/t xxx][/d [p|u:]xx:yy [/c "comment"]]

The linked Microsoft Learn article is the upstream authority. Availability may depend on Windows release, role, optional feature or interactive tool context.

Examples

Example usage for shutdown.

shutdown /r /t 60

Parameters, options and clauses

Option / clauseDescription
/s, /r, /l, /hShut down, restart, sign out or hibernate.
/t <seconds>Set a delay before the action.
/aAbort a pending action during its countdown.
/m \\<computer>Target a remote computer.
/fForce applications to close; unsaved work can be lost.
/iMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
/sgMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
/gMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
/pMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
/hybridMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
/fwMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
/eMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
/oMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
/m <computername>Microsoft documents this switch; use the linked reference for accepted values, effects and version limits.
/t <xxx>Microsoft documents this switch; use the linked reference for accepted values, effects and version limits.
/d [p \Microsoft documents this switch; use the linked reference for accepted values, effects and version limits.
/c <comment>Microsoft documents this switch; use the linked reference for accepted values, effects and version limits.
/?Display command help or the supported command-line usage.
/dMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
/cMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
Safety note

Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.

Official reference ↗Back to directory