How to Restart or ShutdowN

Windows Servers Remotely

Blogs > Windows Servers > How to Restart or Shutdown Windows Servers Remotely

You may encounter a situation where you will need to restart a Windows server however you cannot access the physical server or you cannot log in remotely using Remote Desktop Connection.

Here is how you can restart the server from another computer in the same local area network.

using COMMAND Line

1. Login with a full administrative account to another computer.

2. Open a Command Prompt (CMD) window.

3. Type the following command:

Example 1: Restart a remote server

Shutdown /m \\servername /r 

Example 2: Restart a remote server immediately

Shutdown /r /m \\servername /t 0

If you want to delay the restart, specify the seconds: e.g. /t 60

Example 3: Restart the remote server with a custom message

Shutdown /m \\servername  /c "The server will restart for maintenance purpose"

Example 4: Log off a user on a remote server

shutdown /l /m \\servername

using POWERSHELL

1. Login with a full administrative account to another computer.

2. Open a Powershell window.

3. Type the following command:

Example 1: Use Powershell to restart a remote server immediately

Restart-Computer -ComputerName REMOTE_COMPUTER_NAME -Force

Example 2: Use PowerShell to shut down a remote server

Stop-Computer -ComputerName REMOTE_COMPUTER_NAME -Force

Example 3: Use PowerShell to restart a list of servers

Restart-computer (get-content c:\serverslist.txt)

Example 4: Use PowerShell to shutdown multiple remote servers

Stop-Computer -ComputerName "Servername01", "Servername02"