We’ve all had those moments where the Start menu completely locks up on you, or you’re logged into a headless server where you can’t simply point and click. When things freeze up like that, the Command Prompt isn’t just some old-school tool for power users - it’s honestly the quickest, most reliable way to get a stubborn machine back up and running.

Whether you're dealing with an unresponsive app that refuses to quit, trying to boot straight into your BIOS settings without spamming keys on boot, or rebooting a media rig sitting down the hall, the built-in shutdown utility is easily one of the handiest tricks in your arsenal.

Here’s a quick cheat sheet you can reference if you just need the exact syntax and want to get right back to what you were doing:

Goal Command
Instant Restart shutdown /r /t 0
Force Restart (Kill Apps) shutdown /r /f /t 0
Restart into BIOS shutdown /r /fw /t 0
Restart into Advanced Options shutdown /r /o
Cancel a Scheduled Restart shutdown /a

The Basic Restart Command

To reboot your Windows setup through CMD, you just need to pull up a prompt window. A standard command window will handle a basic restart fine, but honestly, it’s always best practice to launch it as an Administrator right away so you don’t run into random permission headaches later on.

  1. Hit Win + R, type in cmd, and press Enter (or press Ctrl + Shift + Enter to run as Admin).

  2. Punch in this simple command and hit Enter:

DOS

code1 line
shutdown /r

When you run that, Windows won't reboot right away - it builds in a small buffer (usually around 30 to 60 seconds) so you have time to wrap up whatever you're doing. If you’d rather skip that waiting period entirely and trigger the reboot this very second, just attach the timer flag /t:

DOS

code1 line
shutdown /r /t 0

To break that down: /r tells Windows to reboot, while /t 0 drops the delay counter down to exactly zero seconds.

Advanced Restart Options (Force & Timer)

Running the default command works smoothly on a normal day, but troubleshooting rarely happens on a normal day. You’ll often run into frozen software holding everything hostage, or you might be working on a shared PC and need to give everyone else a fair warning first.

Force Restart (Closing Stuck Apps)

If you've ever found yourself stuck watching an application hang forever with a spinning wheel, a standard reboot might just freeze waiting for that program to close. When you need Windows to stop waiting around and cut through the clutter, throw the force switch /f into the mix:

DOS

code1 line
shutdown /r /f /t 0

Heads up: This command immediately kills every single active app in its tracks without asking to save changes. Keep this strictly for times when your system has genuinely stopped cooperating.

Setting a Countdown Timer

If you're running maintenance scripts in the background or just want to set up a delayed reboot while you grab a coffee, you can tweak the seconds counter however you like. For instance, to give yourself a clean 60-second buffer:

DOS

code1 line
shutdown /r /t 60

You can even attach a helpful broadcast note so anyone else signed into that shared rig knows what's happening:

DOS

code1 line
shutdown /r /t 60 /c "Updating system drivers, save your work!"

How to Restart into BIOS or Safe Mode

This is hands down one of my favorite CMD tricks. Modern motherboards and NVMe drives boot up so fast nowadays that catching the F2 or Del prompt during startup feels like an impossible reflex test. Instead of playing the guessing game, you can simply instruct Windows to land directly in firmware settings on the next boot.

Restart to UEFI/BIOS Firmware

This command cuts out the boot-screen panic entirely. It restarts your machine and loads straight into the UEFI/BIOS environment automatically:

DOS

code1 line
shutdown /r /fw /t 0

Quick tip: This one strictly requires an elevated Admin prompt, so make sure CMD was opened with Administrator privileges.

Restart to Advanced Startup Options (Safe Mode)

If you’re sorting out broken display drivers or cleaning up a nasty software conflict, you'll probably need to start your computer in safe mode. Rather than clicking through four different layers in the Windows Settings app, you can jump straight there with this shortcut:

DOS

code1 line
shutdown /r /o

This tells the machine to cycle right into the familiar blue Advanced Startup screen, letting you pick Safe Mode, roll back with System Restore, or fire up Startup Repair.

Restarting a Remote Computer

If you manage a home lab, a Plex box, or work across multiple workstations, getting up from your desk just to press a physical power button gets old fast. As long as the target box is on your local network and your account has admin credentials over there, you can reboot it straight from where you sit:

DOS

code1 line
shutdown /m \\ComputerName /r /t 0

Swap out \\ComputerName with the actual hostname or local IP address of that second machine. And if your everyday setup involves juggling several local desktops and remote sessions side-by-side, learning a few windows window management shortcuts makes multitasking so much smoother.

The Panic Button: How to Cancel a Restart

Pretty much everyone has done this at least once: you type shutdown /r /t 60, hit Enter, and immediately remember you left an unsaved spreadsheet or project open in the background.

Take a breath, because as long as the timer is still ticking down, you can stop the sequence cold with this:

DOS

code1 line
shutdown /a

Here, /a literally stands for abort. A quick notification popup will slide out by your system clock letting you know the scheduled restart was officially called off.

CMD vs. PowerShell: Which One Should You Use?

Command Prompt is classic and available everywhere, but PowerShell is the modern, heavy-duty engine built for proper Windows administration. If you're putting together automation scripts or want a cleaner object-oriented setup, the native Restart-Computer cmdlet is often the better tool for the job.

If you just want a quick, plain-vanilla reboot in PowerShell, run:

PowerShell

code1 line
Restart-Computer

And if you need to shut down stubborn tasks right away (the equivalent of /f in CMD):

PowerShell

code1 line
Restart-Computer -Force

If you plan on chaining these commands together or automating periodic system reboots, it's definitely worth checking out how to run PowerShell scripts so your system policies let them run without running into execution blocks.