How can I add employee IDs and employee numbers to Active Directory?
How can I add employee IDs and employee numbers to Active Directory?
June 24, 2001
A. The employee ID and employee number fields are already in Active Directory (AD). However, you need to tie them to a particular class. First, you must install the Windows 2000 Support Tools from the Win2K CD-ROM (Support/Tools), then perform the following steps:
Install the Schema snap-in (Start, Run, regsvr32 schmmgmt.msc).
To add the employeeID and employeeNumber attributes to the person class, open the Schema console and navigate to Classes, Person. Right-click Person and select Properties. Select Attributes, click Add, then locate and click employeeID. Click OK. Click Add again. Locate and click employeeNumber, then click OK twice to close both dialog boxes.
Open the Active Directory Service Interfaces (ADSI) Edit utility, then navigate to Configuration Container, CN=Configuration, CN=DisplaySpecifiers, CN=409.
In the right-pane, locate and right-click CN=user-display, and select Properties.
In the Edit Attribute box, type the following:
,&Employee ID, eid.vbs
then click Add, and type the following:
,&Employee Number, enum.vbs
These steps configure the options Employee ID and Employee Number on the context menu for a user in the Microsoft Management Console (MMC) Active Directory Users and Computers snap-in.
You must write and place the following scripts on your C drive or somewhere else in your file path:
--------eid.vbs--------Dim oVarDim oUsrDim tmpSet oVar = Wscript.ArgumentsSet oUsr = GetObject(oVar(0))tmp = InputBox("The Employee ID of the user is: " & oUsr.employeeID & vbCRLF & vbCRLF & "If you would like enter a new number or modify the existing number, enter the new number in the textbox below")if tmp "" then oUsr.Put "employeeID",tmpoUsr.SetInfoSet oUsr = NothingWScript.Quit---------enum.vbs---------Dim oVarDim oUsrDim tmpSet oVar = Wscript.ArgumentsSet oUsr = GetObject(oVar(0))tmp = InputBox("The Employee Number for this user is: " & oUsr.EmployeeNumber & vbCRLF & vbCRLF & "If you would like enter a new number or modify the existing number, enter the new number in the textbox below")if tmp "" then oUsr.Put "employeeNumber",tmpoUsr.SetInfoSet oUsr = NothingWScript.Quit
You can also use GALmod from the Exchange Server Resource Kit to add or maintain attributes such as the employee-ID or employee-number.
Thanks to Kurt Hudson for this information.
About the Author
You May Also Like