Tuesday, October 27, 2015

Shutdown Any Machine on Your Network

I recently wrote a script that could shutdown any machine on the network provided that you had sufficient rights, this was to automate restart after multi installations of a patch. However when I ran the script, the heuristics of my anti-virus picked it up as malicious and quarantined it and I then had to restart machines using the command line. So instead of using a script, I decided that I would tell you how to run in manually.

Good old fashioned DOS, will the command line ever die?
Initial Steps
1) Press Windows Key + S.
2) Enter CMD, Right Click and click "Run As Administrator".

Shutdown a Remote Computer
Type on the command line "shutdown -s -m \\name of the computer" in the command prompt and press Enter. Replace \\name of the computer with the actual name of the remote computer you are trying to shutdown. As mentioned earlier, you must have admin rights to shut down the computer that you wish to shut down, it is fairly likely that you do have the rights if you are using a standalone computer, however those that in a domain environment and are not the domain administrator, then it is fairly likely that you do not have access.

One thing to note is that your firewall or the other computer's firewall may prevent you from remotely shutting it down.

No comments:

What"s the time in South Africa?