Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


April 11, 2005

Updating AD Attributes—Revisited

A popular script's makeover lets it work with usernames instead of DNs
RSS
View this exclusive article with VIP access -- click here to join |
See More Active Directory (AD) Articles Here | Reprints | Or sign up for our VIP Monthly Pass!

"Easily Update AD Attributes," July 2003, InstantDoc ID 39117, provides a script that updates attributes in Active Directory (AD) by using a comma-separated value (CSV) file or Microsoft Excel spreadsheet. Since the article's publication, I've received numerous email messages from administrators around the world telling me that the updateattribs.vbs script has saved them countless hours in their efforts to keep their AD user information up-to-date during moves and mergers.

Updateattribs requires that you supply the distinguished name (DN) of the users whose attributes you want to change. You can easily find a user's DN by using the Microsoft ldifde.exe, csvde.exe, or dsquery.exe command-line tool. However, some of the administrators who wrote to me had questions about how to obtain the DNs for their users, so I decided to make the script easier to use by revamping it to take the username as input. I also changed the parameters from unnamed to named.

The Original Version
Let's step back for a few minutes and look at how the original script operates. It requires at least two parameters. The first parameter is the input file formatted as a CSV file or Excel spreadsheet. The second parameter is the name of an output text file in which the script writes a detailed account of every action that it performs. . . .


Already a VIP member?
Please log on to view the full article

Why become a VIP member?

VIP-only online access
VIP CD delivered twice a year: offline access to the entire Windows IT Pro article library
Monthly issue of your choice of Windows IT Pro or SQL Server Magazine

Subscribe Now
Reader Comments
sdfsdaf

jhurleyaz April 13, 2006 (Article Rating: )


Although the script will update "normal" attributes, it does not seems to update abnormal attributes with [blank] fields with numeric characters only. The output says it was changed from [blank] to "xxxx", however the field remained blank. To do this, push alpha characters first, then the numeric characters. The reason this is important to us is we use purely numeric characters for our employee ids.

mmchughcelito March 15, 2007 (Article Rating: )


Thank you Steve Seguis, It works perfectly. This was just the script i was hoping to find, you saved my day (week and month!)

tom.j October 11, 2007 (Article Rating: )


You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
WinInfo Short Takes: Week of November 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...


Scripting Whitepapers From Development to Production: Streamlining SharePoint Deployment with DocAve Deployment Manager

Meeting Compliance Objectives in SharePoint

Email Controls and Regulatory Compliance

Related Events Troubleshooting Active Directory

Concrete Ways to Make Sure Your SharePoint Deployment Doesn't Blow Up

PCI Requirements for Windows and Active Directory: Straight from a Certified Auditor

Check out our list of Free Email Newsletters!

Active Directory (AD) eBooks The Essentials Series: Active Directory 2008 Operations

Keeping Your Business Safe from Attack: Monitoring and Managing Your Network Security

Windows 2003: Active Directory Administration Essentials

Related Active Directory (AD) Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement