Automatically Shutdown of computers in OU
Posted on 2009-04-04
I have written a cmd script which effectively shuts down all computers in a specific OU on my active directory however it takes about an hour to run because of the 2 thousand computers that are in the OU.
Many of them are already off so the shutdown command take a few seconds to effectively timeout. The script runs the SHUTDOWN command on all computers in an OU. Is there any way to query the active directory to issue the SHUTDOWN command only to computers that are really running and connected to the network with an established session?