How to Reboot Windows from PowerShell

By | May 30, 2019

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

restart-computer

How to Reboot Windows 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.

restart-computer -Confirm

Reboot Windows by PowerShell

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

Leave a Reply

Your email address will not be published. Required fields are marked *