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


September 13, 2005

Customizing the User Update Utility

RSS
Subscribe to Windows IT Pro | See More Active Directory (AD) Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Download the Code Here

After reading Ethan Wilansky's two-part Exchange & Outlook Administrator article "Managing User Accounts" (InstantDoc ID 39802 and 40071), I started using the User Update Utility (3U) that the article discussed. This utility provides an easy-to-use GUI for updating Active Directory (AD) user accounts and common attributes that appear in the Global Address List (GAL) in Microsoft Exchange Server 2003 and Exchange 2000 Server. To find the user account you want to modify, you simply enter the user's name or other information into the Search and Modify Utility window, which is the utility's main entry point, then click Find. The search results appear in a table at the bottom of the window. If you select a user account from the results table and click Properties, you'll get the User Account Properties Page. In this page, you can update the properties of the selected user account.

3U consists of the UserUpdate.hta file, two .htm files (Results.htm and PropPage.htm), and the iso3166.xml file. UserUpdate.hta is the heart of the utility. One of its main tasks is to create the Search and Modify Utility window. Results.htm creates the results table, and PropPage.htm creates the User Account Properties Page. The iso3166.xml file contains country names and codes.

I customized 3U's files for my environment and the utility worked great. However, after a while, I started toying with the idea of using UserUpdate.hta from the context menu in the Microsoft Management Console (MMC) Active Directory Users and Computers snap-in rather than the Search and Modify Utility window.

To turn this idea into reality, I first added a Modify User option to the context menu in the Active Directory Users and Computers snap-in. To do so, I followed these steps:

1.I opened ADSI Edit. I've found that the fastest way to open ADSI Edit is to select Run on the Start menu, type adsiedit.msc, and click OK.

2.I expanded the Configuration, CN=Configuration, and CN=DisplaySpecifiers nodes, then selected the CN=409 node.

3.In the right pane, I located the CN=user-Display object, right-clicked it, and selected Properties. The CN=user-Display Properties dialog box appeared.

4.In the Attributes window, I clicked adminContextMenu, then Edit. The Multi-valued String Editor dialog box opened.

5.In the Value to Add text box, I typed the string,&Modify User, C:\usermodmodify.vbs

Note that you must type the comma at the beginning of the string.

6.I closed the Multi-valued String Editor dialog box and the CN=user-Display Properties dialog box by clicking OK twice. I then closed ADSI Edit.

7.I selected Run from the Start menu, typed

mmc /a

and clicked OK to bring up an MMC console window.

8.In the MMC console window, I selected Add/Remove Snap-in under the File menu, then clicked Add. In the Add Standalone Snap-in dialog box, I selected Schema, then clicked Add. I clicked Close, then OK.

9.I right-clicked the Active Directory Schema node in the left pane of the Schema console and clicked Reload the Schema to reload the schema.

10.I closed the Schema console.

With the Modify User option in place, I created the modify.vbs code referenced by the string in Step 5. This code, which Listing 1 shows, calls UserUpdate.hta and passes the selected user's distinguished name (DN) to it. UserUpdate.hta, in turn, calls PropPage.htm.

Next, I modified the UserUpdate.hta file. Because I wanted to use only the User Account Properties Page (and not the Search and Modify Utility window), I modified the Window_onLoad subroutine so that it immediately loads the User Account Properties Page. Listing 2 shows the revised UserUpdate.hta file.

Now when I select a user in the Active Directory Users and Computers snap-in, right-click it, then select Modify User, I get to the User Account Properties Page. From this page, I can easily modify that user's attributes.

End of Article



Reader Comments
This UserUpdate utility works great, but how can I use it accross child domains?

I am an Enterprise admin, so how can I bind to the child and make changes? Since I am logged in to the root.local domain everything works there, but if I try to update a user from the sub.root.local domain it doesn't. It never even pulls the information from the domain.
Working with the original UserUpdate.hta, I believe the problem is in the ADODB.Connection and Command objects - they naturally bind to the current logged on domain - how can I bind it the the child domain?

Thanks, Cliff

clifflang March 14, 2006 (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 9, 2009

An often irreverent look at some of the week's other news, including some more Windows 7 sales momentum, some Sophos stupidity, Microsoft's cloud computing self-loathing, more whining from the browser makers, Zoho's "Fake Office," and much, much more ...

Command Prompt Tricks

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

Understanding File-Size Limits on NTFS and FAT

A general confusion about files sizes on FAT seems to stem from FAT32's file-size limit of 4GB and partition-size limit of 2TB. ...


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 WinConnections and Microsoft® Exchange Connections

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