1. Open Command Prompt
Press `Win + R`, type cmd and press Enter to open Command Prompt. Alternatively, you can search for Command Prompt from the Start menu.
2. Shut down your computer
Type the following command and press Enter :
shutdown /s
The computer will shut down after a short delay.
3. Restart the computer
To restart, type the following command and press Enter :
shutdown /r
The computer will shut down and then restart.
2.) Additional options for the shutdown command
The `shutdown` command also offers other useful parameters:
- Add time delay
Add a delay (in seconds) before shutdown or reboot:
shutdown /s /t 60 # Shutdown in 60 seconds
shutdown /r /t 30 # Restart in 30 seconds
- Cancel restart or shutdown
If you want to cancel the process, use:
shutdown /a
This command cancels scheduled restarts or shutdowns.
With these commands, you retain full control over restarting and shutting down your computer - directly from the command prompt.
4.) Proper Restart and Shutdown Supported Operating Systems:
The described shutdown and restart commands via the command prompt work on almost all modern versions of Windows, including:
Supported operating systems:
- Windows Server :
- Windows Server 2025 (planned)
- Windows Server 2022
- Windows Server 2019
- Windows Server 2016
- Older versions like Windows Server 2012 R2
- Windows Desktop versions :
- Windows 12 (planned)
- Windows 11
- Windows 10
- Older versions like Windows 8.1 and Windows 7
Notes on compatibility:
- Uniform commands : The syntax of the `shutdown` command is the same across all versions mentioned. You can use it without any changes.
- Administrator rights : In some cases, especially on Windows Server systems, you must open the command prompt with administrator rights to run the commands.
To do this, open the command prompt by right-clicking cmd and selectingRun as administrator .
- Remote administration : On server systems, the commands can also be used to shut down or restart remote computers by adding the `/m \\Computername` parameter:
shutdown /r /m \\Server01
Advanced features on servers:
Windows Server provides additional tools such as Task Manager , PowerShell , and Server Manager that provide similar functionality. However, the `shutdown` command remains a quick and reliable solution for basic reboot and shutdown operations.
Conclusion:
The commands described are universal and support both desktop and server operating systems of Windows. Whether you are using a Windows server or a desktop version, the Command Prompt remains a powerful control panel tool.
(Image-1) Proper reboot and shutdown via command prompt?
To check if the input is a number, you can do a simple check using if and a regular expression RegEx in a batch script. However, there is no direct support
The fastest way to run or start the command prompt in every Windows System, is via RUN-Dialog in Windows 11, 10, and MS Server. Please start via Keyboard-Shortcut
The solution to scan all protected system files and replaces incorrect versions with correct Microsoft versions in all Windows 10, 11, . and Server Systems.
This website does not store personal data. However, third-party providers are used to display ads, which are managed by Google and comply with the IAB Transparency and Consent Framework (IAB-TCF). The CMP ID is 300 and can be individually customized at the bottom of the page. more Infos & Privacy Policy ....