Link to home
Create AccountLog in
Avatar of Skiff-SS-N-23
Skiff-SS-N-23Flag for Kyrgyzstan

asked on

Need script to unlock user account

Hello
Need powershell script to automatically unlock specific user account or specific OU in Active Directory.

Script must be associate with specific event log record. Event id Security 4776

Environment:
PDC win server 2008 r2 entrprise
ASKER CERTIFIED SOLUTION
Avatar of Dhananjay
Dhananjay
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Skiff-SS-N-23

ASKER

On PDC in powershellmodule for active directory I run command
Get-AdUser Username | UNLOCK-ADACCOUNT works good
How can I put it in scheduller, where i specify event id from security log?