Script for Active Directory

Posted on 2005-03-17
Medium Priority
Last Modified: 2010-04-17
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:


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?

Question by:ChrisNetAdmin
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 24

Accepted Solution

SunBow earned 1000 total points
ID: 13567478
Scriptomatic 2.0
Utility that helps you write WMI scripts for system administration.
A completely new version of the famous Scriptomatic, the utility that writes WMI scripts for you. (And, in the process, teaches you the fundamental concepts behind writing WMI scripts for yourself.)
LVL 24

Expert Comment

ID: 13567613
MC MCSE Adminpak.msi Tutorial

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

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A hard and fast method for reducing Active Directory Administrators members.
Here's a look at newsworthy articles and community happenings during the last month.
Simple Linear Regression
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question