There are several command line that are most useful:
- /s – Shutdown the computer
- /r – restart computer
- /m \\computer – Specify the remote computer
- /l – Log off
- /t xxx – Set the time out period before shutdown to xxx seconds
- /c “comment” – Message to display on the screen before restart or shutdown
Now let’s move on to some examples. To restart remote computer (hostname: pc2):
shutdown /r /m \\pc2
To restart remote computer (hostname: pc2) with a custom message:
shutdown /m \\pc2Â /c "The Sys Admin has initiated a remote restart on your computer!"
For an immediate restart i.e. no countdown: shutdown /r /m \\pc2 /t 0
If no one is using the computer, you can use the command below to restart the computer immediately having IP 192.168.100.100:Â Â shutdown /r /m \\192.168.100.100 /t 0 /f
Log user off the remote computer: shutdown /l /m\\pc2
Comments