Unlock AD User Account using DSMOD (command line)

The answer is Yes.

dsmod user userDN -disabled no

This does unlock an account.


You can do an unlock/password Reset by SAM Name using this:

dsquery user domainroot -samid %username%|dsmod user -disabled no -pwd %newpass% -mustchpwd yes

Unlock from joeware will do exactly this, as well as reporting currently locked accounts


If you're able to use vbscript, this should do the trick:

Set objUser = GetObject ("LDAP://cn=user,ou=OrganisationalUnit,dc=test,dc=com")
objUser.IsAccountLocked = False
objUser.SetInfo

Ehtyar.