Link to home
Start Free TrialLog in
Avatar of ChrisNetAdmin
ChrisNetAdmin

asked on

Script for Active Directory

I need to create several scripts basically doing the same things.  The first script needs to cycle through all the users in a specified OU in Active Directory and rename the descriptions on certain users.  The OU structure is as follows:

(XXXDomain)
     -Students(OU)
          -WHS(OU)

Notice the WHS OU is under the Students OU.  I need to change the description of all the users in the WHS OU.  Now here's the tricky part.  Currently the users in the WHS OU have a descript but it's one of the following descriptions:

"Students Graduating in Year 2005"
"Students Graduating in Year 2006"
"Students Graduating in Year 2007"
"Students Graduating in Year 2008"

What I want to do is have the script look at that particular user in the WHS OU and look at the description and at WHS to the beggining.  So it should look like this when I'm done..

"WHS Students Graduating in Year 2005"
"WHS Students Graduating in Year 2006"
"WHS Students Graduating in Year 2007"
"WHS Students Graduating in Year 2008"

I was thinking the script could just concatenate the already existing user description w/ the word WHS instead of creating an if statement for each kind of description.  Any suggestions?  Please help?

Thanks,
ChrisNetAdmin
ASKER CERTIFIED SOLUTION
Avatar of SunBow
SunBow
Flag of United States of America 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
MC MCSE Adminpak.msi Tutorial
http://www.mcmcse.com/windows_xp/guides/adminpak.shtml

http://www.serverwatch.com/tutorials/article.php/1573911
Active Directory Tools (FeADTools) include a total of three snap-ins:
Active Directory Domains and Trusts
Active Directory Sites and Services
Active Directory Users and Computers