You can easily reboot windows computer using PowerShell. This article helps you, how to use the command “restart-computer” from PowerShell CMD.
How to Reboot Windows from PowerShell –
At first, open PowerShell prompt by running from CMD.
Just now run the below command which reboots windows without confirmation.
Read Also: How to Start/Stop Service from PowerShell
How to Reboot with User Confirmation –
If you need to confirm for the user with the reboot is required, just use -Confirm argument.
Example Run –
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:\>
Read Also: How to Delete Files from PowerShell