This post explains how to reboot Windows computer using PowerShell command prompt.
Reboot Windows immediately
- 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:\>