Remote shutdown Windows from Linux

Just run the following command:

net rpc SHUTDOWN -C "enter a comment to display at shutdown" -f -I x.x.x.x -U username%password

where x.x.x.x is the ip address.

To know what machines are on in a particular subnet just nmap it, like this:

nmap -sP 192.168.5.0/24 | cut -d " " -f2 > lixo.txt

And with the lixo.txt you can cicle the computers and shut them down, just run this:

for i in $(cat lixo.txt);do net rpc SHUTDOWN  -f -I $i -U user%password; done

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>