Updated: 11 October 2026 · Applies to: Windows 11, Windows 10 and Windows Server (shutdown command, Windows PowerShell 5.1 and PowerShell 7.5 Restart-Computer, from Microsoft’s command references); Ucartz Windows VPS and dedicated servers
To restart Windows from Command Prompt, type shutdown /r /t 0 and press Enter. /r means restart and /t 0 sets the delay to zero seconds; without /t, Windows waits 30 seconds, according to Microsoft’s shutdown reference. The same command works in PowerShell, Windows Terminal, the Run box (Windows key + R) and inside a Remote Desktop session on a server:
shutdown /r /t 0
In PowerShell you can also use Restart-Computer. Restarting a Linux server instead? The command there is sudo reboot: see Linux reboot command.
Restart from Command Prompt, step by step
- Save your work. A restart closes every program for every signed-in user. On a server, warn other users first.
- Open Command Prompt. Open the Start menu, type
cmdand press Enter. On Windows Server, choose Run as administrator instead: according to Microsoft, only Administrators and Backup Operators have the Shut down the system right on servers by default, while on Windows 10 and 11 ordinary Users have it too. - Run the restart command:
shutdown /r /t 0. If a program with unsaved work holds up the restart, add/fto close it without asking:shutdown /r /f /t 0. - Wait and reconnect. On a server, the Remote Desktop window disconnects at once. Wait two or three minutes, then connect with Remote Desktop again.
Useful restart commands
shutdown /r /t 0: restart now.shutdown /r /f /t 0: restart now and force running programs to close. Unsaved data is lost.shutdown /r /t 600 /c "Restart for updates in 10 minutes": restart after 600 seconds and show the comment (up to 512 characters). Microsoft notes that any delay above 0 implies/f.shutdown /a: cancel a pending restart while the delay is still running. Microsoft says to run it in a new Command Prompt window.shutdown /r /o /t 0: restart into the Advanced boot options menu, the way to Safe Mode (Troubleshoot > Advanced options > Startup Settings > Restart). On a remote server this menu is only visible in a console, not over Remote Desktop.shutdown /g /t 0: restart and, after sign-in, start the registered applications again.shutdown /r /t 60 /d p:4:1 /c "Application maintenance": record a planned reason (4:1 is “Application: Maintenance (Planned)”) in the event log.shutdown /s /t 0: shut down instead of restarting. On a rented server you then need the client area to switch it on again, so use/runless you really mean to power off.
shutdown /? lists all options and the reason codes defined on your machine.
Restart with PowerShell
Restart-Computer Restart-Computer -Force
Restart-Computer restarts the local computer; -Force forces an immediate restart. According to Microsoft, the account needs the SeShutdownPrivilege privilege, the same right as above.
Restart another Windows computer remotely
Inside a company network or Active Directory domain, where your account has rights on the target, you can restart another machine without signing in to it:
shutdown /r /m \\SERVER01 /t 0 shutdown /i Restart-Computer -ComputerName Server01 -Credential Domain01\Admin01 -Force Restart-Computer -ComputerName Server01, Server02 -Force Restart-Computer -ComputerName Server01 -Wait -For PowerShell -Timeout 300 -Delay 2
/mnames the target computer.shutdown /iopens the Remote Shutdown dialog, handy for several machines.-Credentialuses another account and asks for its password.-Wait -For PowerShell -Timeout 300waits up to five minutes until PowerShell answers on the restarted machine, which is useful in scripts.- Windows PowerShell 5.1 (built into Windows Server) connects over DCOM by default; if a firewall blocks DCOM,
-Protocol WSManuses Windows Remote Management instead. PowerShell 7 has no-Protocolparameter, only-WsmanAuthentication.
Do not open these management ports to the internet to restart a server you rent. Use Remote Desktop, or the client area below.
Errors you may see
If shutdown fails it prints the Windows error message. The common ones, with their codes from Microsoft’s list of system error codes:
- Access is denied. (error 5): your account lacks the Shut down the system right. Open Command Prompt with Run as administrator as an administrator account.
- A system shutdown has already been scheduled. (error 1190): a restart is already pending. Cancel it with
shutdown /a, then run your command again. - Unable to abort the system shutdown because no shutdown was in progress. (error 1116):
shutdown /afound nothing to cancel.
When the server does not respond
If Remote Desktop hangs or the server is unreachable, restart it from outside Windows:
- Windows VPS: log in to the client area, open the service and use Reboot, or the power options if the VPS does not react. Steps: reboot your VPS from the client area. The VNC console shows what the screen shows, including the Advanced boot options menu.
- Dedicated server: use the power options on the service page, or the IPMI console. Steps: reboot your dedicated server from the client area.
A power reset is like pulling the plug: unsaved data is lost and Windows logs the restart as unexpected. Use it only when a normal restart is not possible, or ask an engineer to find out why the server hangs.
Check who restarted the computer and why
Windows writes event ID 1074 (source User32) to the System log for every normal restart. According to Microsoft it names the process, the user and the reason. An unexpected restart shows event IDs 41 (Kernel-Power) and 6008 instead. To list the last five restarts in PowerShell:
Get-WinEvent -FilterHashtable @{ LogName = 'System'; Id = 1074 } -MaxEvents 5
More Windows commands: Command Prompt commands for server admins, useful PowerShell cmdlets and Command Prompt vs PowerShell.
Official documentation: shutdown, Restart-Computer and troubleshoot unexpected reboots using system event logs.
