How to add Employee ID to Active Directory Users and Computers
1. Open ADSI Edit
2. Expand the CN=Configuration node and go to CN=DisplaySpecifiers, CN=409. Select the 409 node in the left hand pane.
3.In the right-hand pane, select the CN=user-Display object. Right click and select Properties.
4.Select the adminContextMenu attribute and click Edit.
5. We now need to add the value that will be used to create the additional menu item and direct it to the employeeID.vbs script. The syntax is very important. Be sure to include the comma at the beginning and after the menu name (Employee-ID). Add the following syntax to the Value to Add: line:
,&Employee-ID,servernamesharenameemployeeID.vbs (your VBS file must be stored on shared location in order to allow all domain controllers to access it)
6.Change the servername and sharename items to reflect your current environment and then click Add.
7.Click OK to accept the changes and close ADSI Edit.
8.Allow some time for replication to populate the changes throughout the directory.
9.Open ADUC and select a user. Right click on the user and notice the new menu item now available.
10. Select Employee-ID to launch the script from within the ADUC. From here we can either enter a new value for the employeeID attribute for the user or hit Cancel to leave the current value intact. (Note: If no value is present in the field, then the attribute value is empty for that user.)
VBSscript – just copy and paste in notepad, than save as employeeID.vbs and copy to shared folder.
Dim objEmployeeID
Dim objSelectedUser
Dim strNewEmployeeID
Set objEmployeeID = Wscript.Arguments
Set objSelectedUser = GetObject(objEmployeeID(0))
strNewEmployeeID = InputBox(“Employee ID: ” & objSelectedUser.employeeID & vbCRLF _
& vbCRLF _
& “To enter a new Employee ID number,” _
& ” type it into the text box” _
& ” below and click OK.”)
if strNewEmployeeID <> “” Then
objSelectedUser.Put “employeeID”,strNewEmployeeID
end if
objSelectedUser.SetInfo
WScript.Quit
When you right click on user in ADUC you will see new field (EmployeeID)



Can you do this with the employeeType attribute as well?
We have need for that field more than ID.
Jim .
It can be done with any field, I recently did that by adding skype field to ADUC .
Check Microsoft Development center .
Thanks. I don’t do a lot of scripts but it looks simple enough to change. I’ll look on the MS site.
Hi
When i run this script it comes with error messages saying
Expected: ‘)’
line: 6
Char: 73
Any Suggestions Please
Kieran,
You should check your line 6 and character 73,
Check if you don’t have any mistakes..
Try to use TextPad or Notepad++
Hello all,
Script seems no to be working. I have followed all steps but employee id does not appear.
Script is done by copy paste but does not work.
Any ideas?
Thanks,
Employee ID appears on right click ,
I sagest you to check again .
It works for me, and many others.
If I add a custom field to ADUC 2003, will the field still be there if I upgrade to ADUC 2008?
Hi Chad ,
Didn’t have chance to test. but reason tells me that it should be there, it is attribute extension . Schema attributes don’t get deleted during upgrade.
I suggest you testing it in LAB environment before proceed.
I currently have this working in my test area on Server 2008, thank you. But I have a question, is there a way to actually have this appear in the “General” or “Organization” tab under ADUC when looking at the properties of a user?
As an additional question with this working “as is” and showing up on a right click, will it pass this information (employee ID) when using the GetUserProfile Service through MOSS 2007?
I would like to implement this on AD 2000.
I could see EmployeeID field on my LDAP browser and mantain it using Hyena software
What is your experience?
Thanks.
I had a problem with the vbs code and fixed it by replacing all the quotation marks.
” was replaced with ” .
i want to change the Pager attribute in the telephone tab in the users and computers with Skype … not sure how to do this
You can do it by using exchange template editor.
It won’t change AD menu but everything you type in pager field will be displayed in outlook as Skype.
Is that good enough?
Iam getting subscription out of range error at line no 5 at char 1 any idea to rectify this error
Hey anil i am having the same error, did you get it to work?
Hello,
I am currently trying to find a way to set the Employee ID to Null using a vbscript similar to yours. Is this possible?
Thanks,
Kyle
Thanks.
I configured EmployeeID in my AD. Now I wanter to see the EmployeeID in outlook user properties. Please suggest the best way to achieve.