How to Shutdown or Restart Windows from Command Line
Submitted by ingram on Sun, 06/17/2018 - 1:09pm



You can use the "shutdown" command to shutdown or restart a Windows Operating System from the command line. This command works from a regular command prompt or from PowerShell. Here are the commands needed:
To shutdown: shutdown -s -f
To restart: shutdown -r -f
Here are a few useful notes on some of the options:
-f forces all applications to close. This is optional, but will keep hung applications from holding up the shutdown/reboot process (epecially useful for terminal services)
-t is used to wait X number of seconds before shutdown/reboot. For example, "-t 0" will start the process right away, while "-t 100" will wait 100 secons.
Bookmark/Search this post with
Like this article?? Check out these:
User login
Popular content
Today's:
All time:
Last viewed:
Top Categories
Linux
Command Line
ubuntu
windows
Terminal
Windows 7
Exchange 2010
Exchange
Open Source
hosted exchange
hacking
Bible
Christain
SSH
Multi-Tenant
HP
WINE
Server 2008 R2
Switch
Password Recovery
Active Directory
Internet Explorer
nmap
One-Liner
Lync
Citrix
Games
Citrix Receiver
DNS
OpenPanel
Server
ping
Pure-FTPd
Script
RAID
robocopy
server 2008
SonicWall
profile migration
Windows 8
VPN
VM
tweak
Unity
PsExec
ESX
Outlook
BSOD
Awk
ASCII
Control Panel
iis
Exchange 2010 SP1
iptables
IE9
Fail2ban
IE ESC
7
2012
2008
Post new comment