Wednesday, February 18, 2009

How to restart all the computers on your network with PsShutdown.

net view > computers.txt

I used Wordpad to cleanup this file. Replace all "\\" with nothing. Replace all " " with nothing. There were a lot of extra spaces in the file and psshutdown did not like this. If descriptions show up in your file, you may need to use Excel for the cleanup.

psshutdown -c -r @computers.txt >> log.txt

1 comment:

jamsignal.com said...

For some reason 'net view' is not working anymore. This works better.

dsquery computer -o rdn -limit 1000 >computers.txt