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

MajorGeeks.com - This is my Geek. There are many like him but this one is mine.

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


Opera One
Everything
you need.
Already
there.
AI assistant
Aria, built right in
Free VPN
No account needed
Ad blocker
Faster, cleaner web
Tab Islands
Grouped browsing
Useful sidebars
Make it yours
No Clunky Extensions Needed.



MajorGeeks Approved.



Download free

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. K-Lite Mega Codec Pack
5. MusicBee
6. Microsoft Visual C++ 2015-2022 Redistributable Package
7. Mozilla Firefox
8. K-Lite Codec Pack Full
9. Sergei Strelec's WinPE
10. Visual C++ Redistributable Runtimes AIO Repack
More >>

top reads

Star How Much Storage Space Are Your Installed Apps Using in Windows 11?

Star How To Reset and Fix the Settings App in Windows 11

Star How To Remove the Windows 11 Updated Start Menu

Star How To Download a Windows 11 ISO

Star How To Disable Drag Tray

Star How To Boot Into WinRE (Windows Recovery Environment)

Star How To Find the Installation Date of Apps

Star Recently Opened Files - How To Hide or Show Them In Jump Lists, File Explorer, and Start Menu

Star How To Change the Name of a Local or Microsoft Account

Star How To Remove OneDrive From the Navigation Pane in File Explorer


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

Hop into IObit’s Easter Sale and save up to 90% on top utilities, plus score 3 FREE months before the deal disappears! πŸ°πŸŒ·πŸ†

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