Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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)

share|improve this question

3 Answers 3

Try psshutdown.exe from PSTools

share|improve this answer
    
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)

Ton

share|improve this answer
    
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? –  Rabarberski 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 {}
share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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