Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Windows » How to use command prompt to shutdown and restart your computer
  • Domain
    Connectivity to a writable domain controller from a node could not be determined because of an error Virtualization
  • Featured image System Tray icons
    How to Fix System Tray Icons not showing in Taskbar on Windows 11 Windows
  • SQL Error
    Fix “the server was not found or was not accessible: Verify that the instance name is correct and that SQL Server is configured to allow remote connections” Oracle/MSSQL/MySQL
  • MBAM Reports
    Microsoft BitLocker Administration and Monitoring Report Fields Windows Server
  • Screenshot 2022 03 29 at 19.47.05
    CVE-2022-22948: Patch available to address vCenter Server information disclosure vulnerability  Security | Vulnerability Scans and Assessment
  • a Multiple SPF Records  Issues and Examples@2x
    How to setup SPF and TXT Records in AWS AWS/Azure/OpenShift
  • wacxx
    Install Windows Admin Center in an unattended mode using a self-signed certificate Windows
  • vmca course
    Veeam Certified Architect: VMCA Training & Certification Review Backup

How to use command prompt to shutdown and restart your computer

Posted on 02/04/202018/09/2023 Christian By Christian No Comments on How to use command prompt to shutdown and restart your computer
use command prompt

There are times you (as a system Administrator) may want to reboot your PC due to undesired behavior on your PC. During and after the installation of new programs (software and hardware), most times, you may need to restart your device. This will shut off all processes so that the Kernal can be re-established with the new software or hardware. Here are some useful switches (flags) that can be combined to shut down or restart a computer.

For more information on Windows command prompt and PowerShell, see the link. See the following guides on “how to prevent a remote shutdown and restart in Windows 10, how to allow only admin users (administrators) to shut down and reboot Windows Server 2012, how to prevent users from shutting down in a Virtual Machine and Handy Command-Prompt Shutdown Commands.

-r This will have the server shutdown and then restart
-f This will force the server to close any running application 
-t 01 This is a time-out before shutdown.

Combining these commands into a single syntax, we have the following command below

shutdown -r -f -t 00

When this command is run from the command prompt as shown below, the device will be restarted immediately because of the time specified.

shutdown computer

As you can see, the device restart is being initiated as shown below.

– Click on the hyperlink for Windows Active Directory Short Keys – Windows Administrative Shortcut
– For Windows Short Keys – Windows Administrative Shortcut, see the following link

Here's how to do the shutdown functions via a the CLI (batch file):
shutdown -r — restarts
shutdown -s — shutsdown
shutdown -l — logoff
shutdown -t xx — where xx is number of seconds to wait till shutdown/restart/logoff
shutdown -i — gives you a dialog box to fill in what function you want to use
shutdown -a — aborts the previous shutdown command....very handy!
shutdown -h — hibernate. Easy mistake - it's not for help

Additional options:
-f — force the selected action

I hope you found this blog post helpful. If you have any questions, please let me know in the comment session.

Rate this post

Thank you for reading this post. Kindly share it with others.

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Nextdoor (Opens in new window) Nextdoor
Windows Tags:restart, Restart option windows server, Windows 10, Windows 11, Windows Server 2016

Post navigation

Previous Post: Run or Edit and Delete Tasks via Windows Task Scheduler
Next Post: Periodic Scanning: How to schedule Windows Defender Antivirus to scan on Windows

Related Posts

  • windows 10 creators
    Various methods on how to launch Windows Task Manager Windows
  • image 10
    How to use Microsoft SQL Server Management Studio to Export and Import your MsSQL database from Azure to local computer AWS/Azure/OpenShift
  • Featured image TeamsGif.
    How to fix Microsoft Teams GIFs or Images not working Windows
  • OpenSSL on Windows
    How to Install OpenSSL on Windows Computers Windows
  • xxxxxx
    How to move the Taskbar to a second screen in Windows Windows
  • fghj
    Windows Profile: How to determine your windows username Windows

More Related Articles

windows 10 creators Various methods on how to launch Windows Task Manager Windows
image 10 How to use Microsoft SQL Server Management Studio to Export and Import your MsSQL database from Azure to local computer AWS/Azure/OpenShift
Featured image TeamsGif. How to fix Microsoft Teams GIFs or Images not working Windows
OpenSSL on Windows How to Install OpenSSL on Windows Computers Windows
xxxxxx How to move the Taskbar to a second screen in Windows Windows
fghj Windows Profile: How to determine your windows username Windows

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • Domain
    Connectivity to a writable domain controller from a node could not be determined because of an error Virtualization
  • Featured image System Tray icons
    How to Fix System Tray Icons not showing in Taskbar on Windows 11 Windows
  • SQL Error
    Fix “the server was not found or was not accessible: Verify that the instance name is correct and that SQL Server is configured to allow remote connections” Oracle/MSSQL/MySQL
  • MBAM Reports
    Microsoft BitLocker Administration and Monitoring Report Fields Windows Server
  • Screenshot 2022 03 29 at 19.47.05
    CVE-2022-22948: Patch available to address vCenter Server information disclosure vulnerability  Security | Vulnerability Scans and Assessment
  • a Multiple SPF Records  Issues and Examples@2x
    How to setup SPF and TXT Records in AWS AWS/Azure/OpenShift
  • wacxx
    Install Windows Admin Center in an unattended mode using a self-signed certificate Windows
  • vmca course
    Veeam Certified Architect: VMCA Training & Certification Review Backup

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,841 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.