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

MajorGeeks.com - No Geek, no glory.

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



IObit Black Friday Sale

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. MusicBee
5. Microsoft Visual C++ 2015-2022 Redistributable Package
6. Sergei Strelec's WinPE
7. Mozilla Firefox
8. Winslop
9. Visual C++ Redistributable Runtimes AIO Repack
10. Revo Uninstaller
More >>

top reads

Star How To Remove the Windows 11 Updated Start Menu

Star How To Disable Drag Tray

Star How To Permanently Delete Files Without Sending Them to the Recycle Bin in Windows 11

Star How To Repair Install Windows 11, and Keep All Your Files and Apps

Star How To Turn Off Folder Backup Syncing on OneDrive

Star AI Actions - What Are They and How To Enable/Disable Them

Star Microsoft Is Ending 3rd Party Printer Driver Support in 2026: How to Protect Old Printer Drivers

Star How To Stop Edge and Chrome Default Browser Prompts

Star How To Configure Allowed Apps for Controlled Folder Access

Star Pause or Disable Automatic App Updates in Microsoft Store


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

Show your PC some ❤️ Up to 90% off IObit’s top tools + 2 free months for Valentine’s Day
Because your PC doesn't care about Flowers and Candy!

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-2026 MajorGeeks.com
    Powered by Contentteller® Business Edition