×

If you are a Windows Administrator and responsible for managing hundreds or thousands of computers then you may often need to restart or shutdown multiple computers at a time. Performing this task manually will take lots of time. In this case, you can use tho methods to reboot or shutdown the remote computer.

In this guide, we will show you how to restart and shutdown the remote computers using command-line or PowerShell.

Restart or Shutdown with Command Line

In this section, we will show you how to use shutdown command to restart or shutdown the Windows computer with examples.

Basic Syntax

The basic syntax of the shutdown command is shown below

shutdown [option] "Computer Name"

A brief explanation of each option is shown below:

  • /s : Used to restart the computer.
  • /r : Used to shutdown the computer.
  • /l : Used to log off the computer.
  • /m \\computer : Used to specify the remote computer.
  • /c “Message” : Used to specify the message to display on the remote computer screen before restart or shutdown.
  • /t : Used to set the time period for restart or shutdown.

Restart the Local Computer

If you want to restart your own computer, run the following command:

shutdown /r

Restart the Multiple Computer with GUI

You can use the option /i with shutdown command to open a graphical interface to restart a single or multiple computers:

shutdown /i

You should see the following screen:

From here, you can add multiple remote computers and restart or shutdown them easily.

Restart the Remote Computer with Command Line

You can use the option /r and specify the remote computer name to display the prompt on the remote computer and give it a minute before it restarts.

shutdown /r /m \\computer-name

You can also use the /s option to shutdown the remote computer.

shutdown /s /m \\computer-name

Restart a Remote Computer with Message

You can also send a message on the remote computer screen before restart or shutdown it.

shutdown /r /m \\computer-name -c "The IT department has initiated a remote restart on your computer"

Shutdown a Remote Computer After Specified Time

You can use the option /t to shutdown a remote computer after a specific time.

For example, shutdown a remote computer after 10 seconds, run the following command:

shutdown /s /t 10

Restart or Shutdown the Remote Computer with PowerShell

You can shutdown or restart one or more computers easily with the Windows PowerShell. In this section, we will show you how to restart or shutdown the remote computer with PowerShell.

Restart a Single Computer with PowerShell

You can use the following command to restart the remote computer with PowerShell:

Restart-Computer -ComputerName computer-name -Force

Shutdown a Single Computer with PowerShell

You can also shutdown the remote computer using the Stop-Computer command:

Stop-Computer -ComputerName computer-name -Force

Restart Multiple Computers with PowerShell

If you want to shutdown the two computers, run the following command:

Restart-Computer -ComputerName "computer1", "Computer2"

Restart a Multiple COmputers with PowerShell

If you want to restart multiple computers then you can create a text file, add all computers in the file then specify this file path with Restart-Computer command to restart all computers listed inside the file.

Restart-Computer (get-content C:\computer-list.txt)

Conclusion

In the above guide, you learned how to restart and shutdown the remote computer with the PowerShell and command line. I hope you can now easily restart and shutdown the single or multiple remote computers.