Wednesday, June 16, 2021

How to Restart/Shutdown Windows Server / Windows 10 pro - Using Commands?

Using the Windows Restart Command

1 . Restart Windows  with the GUI

Click the Start menu > Power button > Restart.

2. How to Restart/Shutdown Windows Using Command Prompt

> In the Search Windows, type cmd then Command Prompt app will appear on the list. Right click Run as Administrator



C:/> shutdown /r                          -- command to restart

C:\> Shutdown /s                          -- command to shutdown

C:\> Shutdown /s /t 3600            -- command to shutdown after 1 hour


3. How to Restart/Shutdown Windows Using PowerShell Command

> In the Search Windows, type PowerShell then Windows PowerShell app will appear on the list. Right click Run as Administrator



PS C:\> Restart-Computer           -- PowerShell command to restart computer.

 PS C:\> Stop-Computer              -- PowerShell command to shut down the computer.

PS C:\> Stop-Computer -delay 3600       --PowerShell command to shut down after 1 hour.

               

Restart/Shutdown the computer remotely

PS C:\> Restart-Computer –ComputerName “RCTServer”  -- restart the remote computer with the computer name RCTServer

Shutdown Multiple Servers / Computers

PS C:> $Targets =”SQLServer, ExchServer, GnomeServer”
PS C:> Stop-Computer -comp $Targets -force


1 comment: