Providing Free and Editor Tested Software Downloads
< HOME | TUTORIALS | GEEK-CADE| WEB TOOLS | YOUTUBE | NEWSLETTER | DEALS! | FORUMS | >

MajorGeeks.com - Gettin' Geeky with it.

Software Categories

All In One Tweaks
Android
Antivirus & Malware
Appearance
Back Up
Browsers
CD\DVD\Blu-Ray
Covert Ops
Drivers
Drives (SSD, HDD, USB)
Games
Graphics & Photos
Internet Tools
Linux Distros
MajorGeeks Windows Tweaks
Multimedia
Networking
Office & Productivity
System Tools

Other news

· How To and Tutorials
· Life Hacks and Reviews
· Way Off Base
· MajorGeeks Deals
· News
· Off Base
· Reviews




spread the word

· YouTube
· Facebook
· Instagram
· Twitter
· Pintrest
· RSS/XML Feeds
· News Blur
· Yahoo
· Symbaloo

about

· Top Freeware Picks
· Malware Removal
· Geektionary
· Useful Links
· About Us
· Copyright
· Privacy
· Terms of Service
· How to Uninstall

top downloads

1. GS Auto Clicker
2. Smart Defrag
3. Macrium Reflect FREE Edition
4. Sergei Strelec's WinPE
5. MusicBee
6. Visual C++ Redistributable Runtimes AIO Repack
7. FlyOobe / Flyby11
8. Format Factory
9. ImgBurn
10. K-Lite Mega Codec Pack
More >>

top reads

Star 8 Windows Shortcuts That’ll Make You More Productive and Save You Time

Star Windows 10 Not Dead Yet - You Can Still Get Updates For Free

Star What is a '400 Bad Request - Request Header or Cookie Too Large' Error and How to Fix It

Star How to Fix Windows Install Error 0xC1900101

Star How to Force Enable Windows 10 Extended Security Updates If The Option Is Not Showing

Star Windows 11 25H2 is Out: What’s New and How to Get It Now.

Star Star Trek Fleet Command Promo Codes: Redeem Codes for Free Shards, Blueprints And Resources

Star Boost Your PC Speed with ReadyBoost: How a Thumb Drive Can Enhance Your System's Performance

Star 5 Hidden Windows Tools You’ve Had All Along But Never Use

Star Use the Windows 10 Media Creation Tool Before Support Ends For Windows 10 in 2025


MajorGeeks.Com » Overview» Tutorials and Video Guides » How to Shut Down or Restart Your PC Using PowerShell or Command Prompt

How to Shut Down or Restart Your PC Using PowerShell or Command Prompt

By Timothy Tibbetts

on 06/30/2023

🎃🧟‍♂️👻 IObit’s Spooktacular Halloween Sale! IObit Halloween Sale: 90% OFF + Mystery Treat 🍬
Experience faster surfing, smarter security, and total privacy with IObit Pro!

Typically, most of us turn off our Windows computers using Start > Power, but by using PowerShell or the Command Prompt, many more options are available to you.

Using the command line, we can schedule a shutdown or restart, make notes, go to advanced boot options, do a full shutdown, shut down or restart a remote computer, and more.



Open the Command Prompt or PowerShell.

The command you need to know is shutdown followed by a command or argument. Go ahead and type in shutdown or restart now to see a list of available commands.



For example, type in shutdown /r to restart your computer or shutdown /s to shut down your computer. Make sure you save all your work and close all open programs. You have one minute before the actions.



Optionally, if you want to try it out now, type in a shutdown or restart command, close the one-minute warning window, and type in shutdown or restart /a.

A window will popup letting you know that it was canceled.

Here is the list of available commands for your reference.

No arguments - Display help. This is the same as the next command.
/? - Display help.
/i - Display the graphical user interface (GUI).
/l - Log off. This cannot be used with /m or /d options.
/s - Shutdown the computer.
/sg - Shutdown the computer. On the next boot, if Automatic Restart Sign-On is enabled, automatically sign in and lock the last interactive user. After sign in, restart any registered applications.
/r - Full shutdown and restart the computer.
/g - Full shutdown and restart the computer. After the system is rebooted, if Automatic Restart Sign-On is enabled, automatically sign in and lock the last interactive user. After sign in, restart any registered applications.
/a - Abort a system shutdown. This can only be used during the time-out period. Combine with /fw to clear any pending boots to the firmware.
/p - Turn off the local computer with no time-out or warning. It can be used with /d and /f options.
/h - Hibernate the local computer. It can be used with the /f option.
/hybrid - Performs a shutdown of the computer and prepares it for a fast startup. Must be used with /s option.
/fw - Combine with a shutdown option to cause the next boot to go to the firmware user interface.
/e - Document the reason for an unexpected shutdown of a computer.
/o - Go to the advanced boot options menu and restart the computer. Must be used with /r option.
/m computer - Specify the target computer
/t xxx - Set the time-out period before shutdown to xxx seconds. The valid range is 0-315360000 (10 years), with a default of 30. If the time-out period is greater than 0, the /f parameter is implied.
/c - “comment” Comment on the reason for the restart or shutdown. A maximum of 512 characters allowed.
/f - Force running applications to close without forewarning users. The /f parameter is implied when a value greater than 0 is specified for the /t parameter.

/d [p|u]xx:yy - Provide the reason for the restart or shutdown. Here are the command explanations:
p - indicates that the restart or shutdown is planned.
u - indicates that the reason is user-defined.
If neither p or u is specified, the restart or shutdown is unplanned.
xx - is the major reason number (positive integer less than 256).
yy - is the minor reason number (positive integer less than 65536).


Similar:
  • The Ultimate List of Every Known Command Prompt and PowerShell Commands
  • PowerShell and Command Prompt 101
  • Sleep, Hibernate or Shut Down Your PC?
  • How to See if Power Throttling is Enabled in Windows 10


    comments powered by Disqus




  • © 2000-2025 MajorGeeks.com
    Powered by Contentteller® Business Edition