Using WMI to change the local administrator password for all servers in an OU or Container

Just sharing a nice little script to query all the computers in an OU and change the local Administrator password for each one. One thing to note, if your computers happen to be in the default Computers container, you need to change the LDAP query from "OU=Finance" to "CN=Computers" (CN indicates container).

http://www.microsoft.com/technet/scriptcenter/resources/qanda/oct04/hey1015.mspx

No Comments