Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security, Veeam & DevOps

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form

How to use command prompt to shutdown and restart your computer

Posted on 02/04/202016/09/2026 Christian By Christian No Comments on How to use command prompt to shutdown and restart your computer
  1. Home
  2. Windows
  3. 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. Please see  how to prevent users from shutting down in a Virtual Machine and Handy Command-Prompt Shutdown Commands.

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, and how to allow only admin users (administrators) to shut down and reboot Windows Server 2012.

Command Prompt

Below are some useful command prompt for shutting down and restarting your PC.

-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.

Text on a blue background indicating the shutdown of the Windows Modules Installer service.

– 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.

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

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
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

  • UEFI vs BIOS What's the Difference
    What are the Differences between UEFI and BIOS Windows
  • How to Disable Automatic Opening of Previous files in Notepad on Windows 11
    How to Disable Automatic Opening of Previous Files in Notepad on Windows 11 Windows
  • Featured image GettingWinReady
    Fix “Getting Windows Ready” Don’t turn off your computer stuck on Windows Windows
  • win 10 login screen 1
    How to Transfer User Profile to another User in Windows Windows
  • Creating a WinPE USB Drive Fixing System Boot Issues
    Creating a WinPE USB Drive: Fixing System Boot Issues Windows
  • Turn On Or Off Auto Unlock For BitLocker Drive
    How To Turn On Or Off Auto-Unlock For BitLocker Drive In Windows 10/11 Security | Vulnerability Scans and Assessment

More Related Articles

windows 10 bjw3 1280x720 1 How to Find the Pathname of a Mapped Network Drive Windows
MBAM roles Understanding Microsoft BitLocker Administration and Monitoring Roles Windows
Disable automatic updates Turn off Automatic Updates in Windows via Windows Registry and Group Policy Windows
sandbox How to Configure Windows Sandbox Virtualization
RecomveRDSlicense How to remove RDS Client Access Licenses from RDS Server Windows
AppLocker Fix unable to start the Application Identity Service Windows

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

vexpert-badge-stars-5

Virtual Background

VEEAMLEGEND

Categories

Top 30 Sysadmin blog

veeaam100

Veeam Vanguard

  • How to Install Winget on Windows Server
    How to Install Winget on Windows Server Windows Server
  • Screenshot 1
    Using IBM Library with Veeam Network | Monitoring
  • Spell Check Not Working in Microsoft Word
    How to Fix Spell Check Not Working in Microsoft Word Microsoft Exchange/Office/365
  • DC 3
    How to demote and remove a Domain Controller on Windows Servers Windows Server
  • Fix OneDrive Error
    How to Fix OneDrive Error 0x80071129: The tag present in the reparse point buffer is invalid Windows
  • MicrosoftOneDrive32
    Microsoft OneDrive Setup: Files On-Demand & Key Features Backup
  • Check the BIOS version
    How to check the BIOS version on Windows Windows
  • cimInstance wmi
    How to fix Get-CimInstance Access PermissionDenied Windows

Subscribe to Blog via Email

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

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

Tags

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

Copyright © 2026 TechDirectArchive

Loading Comments...

You must be logged in to post a comment.