?
Solved

Script for Active Directory

Posted on 2005-03-17
4
Medium Priority
?
239 Views
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:

(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
0
Comment
Question by:ChrisNetAdmin
[X]
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
4 Comments
 
LVL 24

Accepted Solution

by:
SunBow earned 1000 total points
ID: 13567478
http://www.microsoft.com/technet/scriptcenter/default.mspx
Scriptomatic 2.0
Utility that helps you write WMI scripts for system administration.
http://www.microsoft.com/downloads/details.aspx?FamilyID=09dfc342-648b-4119-b7eb-783b0f7d1178&DisplayLang=en
Overview
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.)
http://www.computerperformance.co.uk/Logon/LogonScript_Scriptomatic.htm
http://blogs.msdn.com/brianjo/archive/2005/01/17/354878.aspx
0
 
LVL 24

Expert Comment

by:SunBow
ID: 13567613
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
0

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
Progress
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