Utilize Command Prompt as a Last Resort for Forcing Windows Shutdown
In a perfect world, you'd live a long, joyful life solely relying on the Start menu to power down and boot up your PC. But life isn't always spotless, and we might find ourselves in situations where we need to trigger a restart or shutdown via the command prompt instead. Maybe the Start menu's on the fritz, or perhaps you're stuck on a screen sans the Start menu. I've resorted to the command prompt to power off Windows during the initial setup phase for the system, or when troubleshooting issues preventing Windows from functioning properly.
You've probably stumbled upon the command prompt, the text-based interface hidden away in Windows, a relic from the days of yore before computer operating systems sported pointers and graphical user interfaces. It's still useful for low-level system operations and can be accessed by launching either the command prompt or PowerShell from the Start menu, right-clicking on the Start menu button, or by typing "cmd" into the search bar and hitting Enter.
The command is the text command you need to power off or restart your Windows computer. Key in this command into the command prompt or PowerShell and hit Enter, and you'll get a rundown of ways to use it. For a simple shutdown or restart, type "shutdown /s" or "shutdown /r," respectively. A dialog box will appear on the screen informing you of the action, and the process will be completed in under a minute. These commands initiate a normal shutdown procedure, prompting you to save any unsaved work in open programs that typically do that.
If you want to force all apps to close without further ado – perhaps if you need to ensure the shutdown or restart goes through without disturbance – add the "/f" at the end of your command. However, be aware that you do this at your own risk, with the potential of losing unsaved data. The "/s /f" command will shut down your computer, while the "/r /f" command will restart it.
The "shutdown /r /o" command can be helpful for troubleshooting purposes, as it reboots your computer into the advanced boot options screen. This screen offers features such as using a USB drive to recover your PC, running the built-in start-up repair utility, and rolling back recent updates to Windows. You can also navigate back to the command prompt from here without booting the operating system.
The "/t" flag can also be useful; follow it with a space and a number to delay the shutdown or restart for a specified number of seconds. The number represents the number of seconds Windows should wait before proceeding, going from 0 (instant) all the way up to 10 years (315360000 seconds, if you were curious). If the seconds are set to anything above zero, the "/f" flag is also applied.

Finally, you can use "shutdown /a" to halt a shutdown that's currently in progress (perhaps one you've scheduled on a timer). For a comprehensive rundown of all the ways you can use this command, including advanced options for IT managers, check out the official Microsoft documentation.
Here's the quick and dirty if you're in a bind:
- Open Command Prompt.
- Type the following command and press Enter:
This command forces your Windows PC to restart instantly, bypassing prompts, and shutdown procedures, making it handy if your system's unresponsive or the Start menu or power button are off-limits. Remember, using "/f" can result in unsaved work being lost, so use it sparingly. This is essentially a last-ditch effort, akin to holding down the physical power button, but with software control.

In certain circumstances, when the Start menu isn't functioning as expected or is inaccessible, you can use PowerShell, a technology-based tool included in Windows, to trigger a restart or shutdown. For an immediate and forced restart, type the command in the PowerShell or command prompt and press Enter. This command utilizes the command, a part of tech that allows users to manage their Windows system from the command line.