Link to home
Start Free TrialLog in
Avatar of Andrew N. Kowtalo
Andrew N. Kowtalo

asked on

Need Help adding a stipulation

Set-ADAccountPassword sampleuser -Reset -NewPassword (ConvertTo-SecureString -AsPlainText “samplepw” -Force -Verbose) –PassThru

Can someone tell me how to add a stipulation to this PowerShell line to unlock the AD account as well?   
Avatar of oBdA
oBdA

There's Unlock-ADAccount for that:
Set-ADAccountPassword -Identity sampleuser -Reset -NewPassword (ConvertTo-SecureString -String 'samplepw' -AsPlainText  -Force -Verbose) -PassThru | Unlock-ADAccount -Verbose

Open in new window

Avatar of Andrew N. Kowtalo

ASKER

So theres no way to add that to my line to unlock and reset all together?
@obda is that it?
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial