Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 242
  • Last Modified:

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
0
ChrisNetAdmin
Asked:
ChrisNetAdmin
  • 2
1 Solution
 
SunBowCommented:
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
 
SunBowCommented:
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

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now