Restart Windows Server Remotely: shutdown and PowerShell

20 Feb 2026 By Roman Sokolov

The easiest way to restart Windows Server remotely is shutdown /r /t 0 in an RDP console or Restart-Computer -Force in PowerShell. To power it off, use shutdown /s or Stop-Computer. You can also reboot another server over the network by naming it. Below are all the commands with their options and a safeguard against accidental shutdowns.

Method 1. The shutdown command

The classic shutdown utility works in both cmd and PowerShell. The main switches:

Switch Action
/r Restart
/s Shut down
/t <sec> Delay in seconds
/f Force applications to close
/a Cancel a scheduled shutdown
/m \\host Run against a remote computer

Restart the current server immediately:

shutdown /r /t 0

Restart in 60 seconds with a notice to users:

shutdown /r /t 60 /c "Scheduled server restart in one minute"

Shut the server down:

shutdown /s /t 0

Method 2. PowerShell

The more modern option, and easier in scripts. Restart:

Restart-Computer -Force

Shut down:

Stop-Computer -Force

The -Force flag closes applications that would otherwise block the shutdown.

Cancelling a scheduled shutdown

If you set a delay (/t) and changed your mind, cancel it before the timer fires:

shutdown /a

Restarting another server over the network

From PowerShell you can restart a remote machine by naming it or giving its IP together with credentials:

Restart-Computer -ComputerName "SRV02" -Credential (Get-Credential) -Force

The same thing over the network with the classic shutdown:

shutdown /r /m \\SRV02 /t 0 /f

For the remote variants to work, the target server needs WinRM enabled (for PowerShell) or the Remote Registry service running, with the matching firewall ports open.

Restarting safely: warn your users

If people are working on the server, give them time to save — set a delay and a message:

$comment = "The server restarts in 5 minutes. Please save your work."
shutdown /r /t 300 /c $comment

Check who is signed in before you restart:

query session

Frequently asked questions

What is the difference between shutdown /r and Restart-Computer?

Both restart the server. shutdown is the general-purpose utility with precise control over delays and messages; Restart-Computer is more convenient in PowerShell scripts and for restarting several machines at once.

How do I cancel a restart if I got the command wrong?

While the /t timer is still running, use shutdown /a to cancel the scheduled shutdown. With /t 0 there is nothing left to cancel.

Will I lose RDP access after the restart?

No. When RDP is configured correctly it starts automatically with the system. Wait a minute or two and reconnect with the same mstsc or other client.

Why does a remote restart of another server fail?

Usually WinRM is not enabled (needed for Restart-Computer -ComputerName) or the ports are closed in the target machine’s firewall. Run Enable-PSRemoting on the remote server and check the firewall rules.


Need a server with full control over reboots and a KVM console for emergencies? Take a Windows VPS or review the VPS hosting plans.

Roman Sokolov