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

MajorGeeks.com - Geek your mind, the rest will follow.

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. Macrium Reflect FREE Edition
3. Smart Defrag
4. K-Lite Mega Codec Pack
5. Visual C++ Runtime Installer (All-In-One)
6. Microsoft Visual C++ 2015-2022 Redistributable Package
7. Visual C++ Redistributable Runtimes AIO Repack
8. MusicBee
9. McAfee Removal Tool (MCPR)
10. Sergei Strelec's WinPE
More >>

top reads

Star How to Disable 1-Click Ordering on Amazon (and Avoid Surprise Charges)

Star How to Fix Shallow Paint Layer Depth in Bambu Studio

Star Fastest Payout Online Casino USA (2025) | Real Money Wins

Star Aviator Betting Game Secrets: Unlock 97% RTP & Triple Your Wins

Star Windows Recall: What It Is, Why Hackers Will Love It, and How to Stay Safe

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

Star Best Apple Pay Casinos USA 2025 – Top Apple Pay Sites

Star How To Use VLC Media Player to Trim Video Clips

Star What Is the $WinREAgent Folder and Can I Delete It?

Star Swear Your Way to Better Search Results


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

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