Command to shut down computer on LAN.

Today, I find a command on Windows to trick my friend at work. What I did is to run a command to pretend to shut down his machines over the network.
Here it is the command: 
>>>shutdown /s /t 300 /m \ComputerName /c “Comment about what is happening”

The command above will Shut down the computer named “ComputerName” in 300 second [which is 5mins] and it will display a message on the screen saying “Comment about what is happening”. i.e. shutdown /s[as action] /t [time in second] /m [\MachineName] /c [Comment]

If you would like the restart the computer rather than shut down the computer you can change “/s” to “/r
As I just pretend to shutdown his computer I did cancel the shutdown command remotely.

To rescuse it what you need to do is run a command to abort the shut down.
> shutdown -a /m \ComputerName
-a = abort shut down
You can make use of this command when you need to remote shutdown/restart computer when you need to, without having to go to each of the machine individually to shutdown/restart the machines.
Have fun.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.