If you haven’t already, please read my first post on where and how to download a trial version of User Management Resource Administrator, developed by tools4ever.
Download Trial Version of UMRA à http://www.tools4ever.com/download/
In this blog post I am going to tell you about a scenario I ran into when trying to manage my Active Directory User Accounts. I was given a task to update over 3500 User accounts in 2 days. I was given a CSV of the user’s data, and was told I need to make sure the data in the CSV matched what was in Active Directory; I also needed to make sure each account was given groups based on a special column in the CSV. This type of User Provisioning is a huge task, however, since I’ve been using UMRA for sometime now, I knew this task would now take a few hours to create the script and run it, compared to 4 or 5 days of updating each user account singly. So how did I update all these Active Directory User Accounts so fast……see the below steps on how I did it.
I was looking through some of the UMRA Actions and noticed an action called “Map Variable”. You can find this action under the tree Variable Actions à Programming à Map variable. This action allows you take a value passed in from CSV, Network data, Active Directory Object etc. and do a check on it. So you can now pass this action, some data and have it do a check to see if it matches anything in the “Map Table” if it does, assign another variable the value that it matched. How did this help me? I was now able to pass the description from my CSV of User Data, to this Script Action, and have it check to see if that description matched anything in my “Map Table” if it did, kick out a variable with the Active Directory Group’s name that I needed to add to the user.
Here is a screen shot of my “Map Variable” action:
If you need help with attaching a CSV to your project see this blog: here
If you need help with if/then/else clauses see this blog: here
As you can see, I have a variable called %csv_description% that I am passing into this “Map Variable” action, and its going to see if that matches any of my Input values, if it does, it will update the variable called %group_dn% with the matching output value.Now that we have the “Map Variable” action down, here is a quick look at the rest of my script. Let me explain a bit what’s going on here in my UMRA script.
--> First I Map my passed variable from my CSV data to the “Map Variable” action.
--> I get the Active Directory user object (see my first blog post on how to do this)
--> I remove all group memberships of the Active Directory user object
--> I add the mapped group to the Active Directory user object
--> Then we update the Active Directory User Object Attributes
If you notice we have some “error logic” added to our script now. This will be our next topic I want to go over. So until next time!
0 comments:
Post a Comment