Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBS for Auto Disabling Users in Active Directory

Status
Not open for further replies.

damienenglish

Technical User
Mar 21, 2012
27
GB
Afternoon All

I am looking to come up with a way to 'auto-disable' a user account when it is put into a particular OU in Active Directory. We have an OU called 'Leavers' which contains accounts of users who have just left the company, prior to archiving out their email and various files.

When moving to the user account to the 'Leavers' OU, I would like it to do the following

1) Disable the User Account
2) Auto-Hide the User from the Global Address List (GAL)

I would also like to setup a script that will find any accounts that have been unused for 3 months, to then move the account in the 'Leavers' OU.

Is all this possible and would VBS be the best way to do it, or would Group Policy be the better option?

Many Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top