How to Reboot Windows using PowerShell for Windows
In this blog post, I will show how to reboot Windows using PowerShell.
As you know, rebooting Windows is typically done through the graphical interface, but understanding how to reboot Windows using PowerShell can be beneficial for various reasons (e.g., automation tasks, install scripts, etc.). Also, you may find yourself in a Windows environment that requires the use of the command line (e.g., Server Core).
You don’t need administrator privileges to reboot a desktop version of Windows, but you do need them to reboot a Windows Server.
To reboot Windows from the command line, run the following command in a PowerShell terminal.
Restart-Computer
If you need to forcefully reboot Windows (without waiting for all the programs to close first), use the “-Force” switch.
Restart-Computer -Force
Posted in Code Snippet, Command Prompt, Computers, Internet and Servers, Operating Systems, PowerShell, Tips & Tutorials