Link to home
Start Free TrialLog in
Avatar of Gautam Chaudhary
Gautam Chaudhary

asked on

Unlocking bulk AD user accounts through Script

Please help me developing a script (Powershell/ VBS/ command line) for unlocking bulk AD user accounts . Script will be fetching the list of IDs from a .txt / .xls file

Distinguished name for the OU where i am having permission is mentioned below

OU=India,DC=XYZ,DC=com
ASKER CERTIFIED SOLUTION
Avatar of VB ITS
VB ITS
Flag of Australia image

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
Avatar of Gautam Chaudhary
Gautam Chaudhary

ASKER

It is a PS script...right but what do i do if i need to see the output for the query that what all are the accounts that has been unlocked
Add -Passthru

Import-Module ActiveDirectory
Search-ADAccount –SearchBase ‘OU=India,DC=XYZ,DC=com’ –LockedOut | Unlock-ADAccount -Passthru

Open in new window

Thanks VB ITS.... this solves half of my purpose....Please help if i have to unlock and reset password at the same time for a handful of domain IDs.
Thanks Joshua Grantom.
Can you please help if i have to unlock and reset password at the same time for a handful of domain IDs provided the list of IDs will be fetched from a file kept at a location
Gautam,

Yes I can help you, please post a new question as you have selected an answer for this one already.