Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Adding custom Attributes to ACtive Directory User Properties

Posted on 2006-11-27
9
Medium Priority
?
628 Views
Last Modified: 2009-01-16
Hello all,

Could any one throw some light on how to add additional fields to a user name property box. For Example In the organization tab i would like to add one more custom field called EMP NO. It's windows 2003 based Active Directory Service.

Regards
0
Comment
Question by:Mohd-Anwaruddin
9 Comments
 
LVL 4

Expert Comment

by:jcdesign4u
ID: 18017737
I don't believe that's possible.
0
 
LVL 14

Expert Comment

by:inbarasan
ID: 18017996
If you are looking at adding Employee id then that field is already in AD Schema.
To enable it, kindly follow the article
http://www.softheap.com/security/active-directory.html

It is possible to add the custom attributes. May be some more experts will be help you on that
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 10

Expert Comment

by:ryangorman
ID: 18018249
To explicitly answer your question - you cannot [3] edit the GUI to display new attribute. However, as inbarasan suggested, you can work-around the problem by adding context menus to the user object. These context menus launch VBS scripts that can display and edit whatever you desire.

The Windows 2003 schema [1] already has attributes  for employeeID, employeeNumber and employeeType. You do not need to edit the schema to 'activate' them. The second part of inbarasan's article [2] forgets to explicitly say that you need to edit the adminContextMenu attribute (normally this is the first attribute in the list so no problem really).


[1] http://www.jsifaq.com/SF/Tips/Tip.aspx?id=9642
[2] http://www.softheap.com/security/active-directory.html
[3] I have heard that Microsoft may have provided a method for C++ programmers.


0
 
LVL 1

Author Comment

by:Mohd-Anwaruddin
ID: 18019235
Dear All,

When i done the things what mentioned in the article by ryangorman i get the following error

Windows Script Host
Line 7
Char 5
Compilation Error
Error  Expected Statement
Code 800A0400
Source Microsoft VB Script Compilation Error

Please let me know what do i have to do.

I just copied the script and pasted it still it did not work out


Thanks
0
 
LVL 10

Expert Comment

by:ryangorman
ID: 18019272
Inbarasan  deserves the credit for any script from http://www.softheap.com/security/active-directory.html.

You did realise that there were TWO scripts, one called eid.vbs and another called enum.vbs. Both scripts start with "Dim oVar" and end with "WScript.Quit".

0
 
LVL 10

Accepted Solution

by:
ryangorman earned 1500 total points
ID: 18019302
Word wrapping has caused the problems. I have placed line numbers at the start of each proper line.

1 Dim oVar
2 Dim oUsr
3 Dim tmp
4 Set oVar = Wscript.Arguments
5 Set oUsr = GetObject(oVar(0))
6 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")
7 if tmp <> "" then oUsr.Put "employeeID",tmp
8 oUsr.SetInfo
9 Set oUsr = Nothing
10 WScript.Quit


1 Dim oVar
2 Dim oUsr
3 Dim tmp
4 Set oVar = Wscript.Arguments
5 Set oUsr = GetObject(oVar(0))
6 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")
7 if tmp <> "" then oUsr.Put "employeeNumber",tmp
8 oUsr.SetInfo
9 Set oUsr = Nothing
10 WScript.Quit
0
 
LVL 1

Author Comment

by:Mohd-Anwaruddin
ID: 18019854
I Was wondering if there would be any on exchange if the above mentioned is done????


Though thanks every one

0
 
LVL 1

Author Comment

by:Mohd-Anwaruddin
ID: 18019859
I mean would there be any effect on Microsoft Exchange 2003 if we did the above mentioned changed
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us need to configure DHCP server(s) in their environment. We can do that simply via DHCP console on server or using MMC snap-in on each computer with Administrative Tools installed in a network. But what if we have to configure many DHCP ser…
Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question