≡ Menu

PowerShell : Reboot Windows

This post explains how to reboot Windows computer using PowerShell command prompt.

Reboot Windows immediately

  • Open PowerShell prompt by running powershell from cmd.
  • Run the below command which reboots Windows without asking user for any confirmation.
    restart-computer

Powershell command for rebooting computer

Reboot with user confirmation

If you want the user to confirm if reboot is required, then use -Confirm argument.

restart-computer -Confirm

Reboot windows with user confirmation

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:\>
2 comments… add one
  • Li

    Can a non-admin user run this command and reboot windows

    • Victor Ordu

      I should think so, if by “admin” you mean someone not running Powershell in system/32 mode… But then, it might also depend on administrator settings. I would also like to have a definitive answer to this question.

Leave a Comment