Hi Austin,
There is no way to programatically lock an account, that can only be done by
typing the wrong password more times than your policy allows. You can
disable accounts from a script though. Here is a quick sample that can get
you started, edit this code and save with a .vbs extension, then you run it
from a command prompt with the command: cscript myscript.vbs
Any questions, let me (and the newsgroup) know.
'**'Script Start
Dim myOU
Dim Account
Set myOU=GetObject("LDAP://OU=MyOU,DC=myDomain,DC=com")
For Each Account In myOU
'Value -1 Disables accounts and 0 ecnables them again
myOU.accountdisabled=0
myOU.setinfo
next
'**Script End
Regards
Niclas Lindblom