Just a quick question. I need to be able to unlock user accounts from the command line, NOT using NET USER loginname /DOMAIN /ACTIVE:YES
This is because our corporation lives across 4 domains, and the NET command is tied to the computer domain, with no way to specify alternative domains. Also, using ADUC is not an option for this specific case.
Basically, does DSMOD USER userDN -disabled no actually unlock an account? I can test this on Thursday, but wanted to know if I had to get in early to script the solution instead.
Cheers
The answer is Yes.
This does unlock an account.
You can do an unlock/password Reset by SAM Name using this:
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:
Ehtyar.
The answer by @Akshi (which received a negative vote unfairly) should be the correct one - account disabled and LockedOut are two different things.
Admins with the proper rights can Disable an account, using the wrong password too many times will Lock your account.
Using
Get-ADUser %username% -prop LockedOut
in Power-Shell you can see the Enabled and the LockedOut attributes.dsmod user userDN -disabled no
requires elevated admin privileges to work in most system setups, and I'm not sure it will unlock the account, I couldn't test it.Unlock-ADaccount username
will work for most users with basic admin rights - worked for me.i think you should use that command Unlock-ADaccount username
hopefully this will help you