Manage Learn to apply best practices and optimize your operations.

Top Windows command-line commands

4/6

Shut down a computer with shutdown /s

Source:  iStock/RUSSELLTATEdotCOM
Visual Editor: Sarah Evans/TechTarget

Sometimes, when you're going through your systems management routines, you may have to shut down or restart a user's computer. The shutdown /s command is a script to do just that. The user receives a notification saying their computer will shut down in one minute. If you are performing the command remotely, you should use shutdown /m \\computername /s.

To automatically have the computer restart, you would use shutdown /r. If you start to shut down a computer and change your mind, you can abort the operation with shutdown /a. If you want to ensure the user has enough warning before the shutdown, you can give them two minutes with shutdown /r /t 120 /c "Shutting Down for maintenance" /f /d p:4:1.

If you don't need to shut down a user's computer but you do need to ensure it is fully updated before the Windows Update/Automatic Update client does its job, you can use wuauclt /detectnow to do so. Windows Update/Automatic Update contacts Microsoft every 22 hours to see if there is an update it should push to the computer.

View All Photo Stories

Join the conversation

1 comment

Send me notifications when other members comment.

Please create a username to comment.

Have you ever accidentally shut down a user's computer before they could save?
Cancel

-ADS BY GOOGLE

SearchVirtualDesktop

SearchWindowsServer

Close