Do you want to know how to reboot Windows computer using PowerShell . This post explains how to use the command
restart-computer to trigger reboot from powershell CMD.
Reboot Windows from PowerShell
- Open PowerShell prompt by running
- Run the below command which reboots Windows without asking user for any confirmation.
Reboot with user confirmation
If you want the user to confirm if reboot is required, then use
PS C:\> restart-computer -Confirm Confirm Are you sure you want to perform this action? Performing the operation "Enable the Local shutdown access rights and restart the computer." on target "localhost (local-pc)". [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): N PS C:\>