What are the different possibilities to remotely shut down multiple Windows XP Professional PCs (that are part of an Active Directory domain)?

What are the advantages/drawbacks of each method, and is there some notification to and cancellation option for the potential user?

Any differences or improvements with Vista or Windows 7?

(FYI: The shut down would be to save energy over-night)


Try psshutdown.exe from PSTools

  • Quite useful tool, actually: was using it to reboot PCs remotely after important patches... or when knew that electricity will be down... even when could not locate PC on the network - shut it down repeatedly and wait till user complains :-) Easy to use in scripts... Many controls available... Can work with list of PCs...
    – alexm
    Nov 10 '09 at 12:18

The function 'Shutdown' can shutdown another computer at will, however it must be enablded at the receiving computer and you need sufficient rights.

To start start CMD (Run) and enter 'Shutdown' this will give back a set of options (including reboot/shutdown, time span, message, and computer)


  • What do you mean by 'it must be enabled at the receiving computer'? I assume that if you login with admin rights the shutdown command is always available, no? Nov 10 '09 at 10:34
  • You can run 'Shutdown' on computer A to shutdown computer B, to be able to do so you need the appropriate rights on computer B.
    – Ton Plomp
    Nov 14 '09 at 10:56

This is how I've done it in the past (please note, it's off the top of my head, as I don't have a windows computer in front of me at the moment)

ListObjects LDAP_PATH COMPUTER -R | xargs -i shutdown -s -t 0 -f -m {}

Replace LDAP_PATH with the location of the computers you wish to shutdown in AD (e.g. LDAP://OU=subou,OU=subou,OU=toplevelou,DC=mydomain,DC=com). From memory, the LDAP path and parameter 'COMPUTER' are case dependant.

Edit: Example to shutdown all computers in the top level OU 'MyOU' in AD domain 'example.com' recursively you could use

ListObjects LDAP://OU=MyOu,DC=example,DC=com COMPUTER -R | xargs -i shutdown -s -t 0 -f -m {}
  • Obviously, test first, (I did state it was off the top of my head). An easy way of doing this is to place an echo command in the xargs command (e.g. xargs -i echo shutdown...), and the command will output a list of commands it will execute to screen, rather than executing them.
    – Bryan
    Nov 14 '09 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.