http://www.perlmonks.org?node_id=997840


in reply to Disable an AD Account via LDAP

The LDAP attribute you need to use is:
useraccountcontrol:1.2.840.113556.1.4.803
I do not have actual code to SET/RESET that, but you can start with: this StackOverflow article.

             I hope life isn't a big joke, because I don't get it.
                   -SNL