Adding Custom Attributes in Active Directory
Pre-requisites
Enable Schema Updates by Means of the Registry:
1.
Click Start, click Run, and then in the Open box, type:
regedit
Then press ENTER.
2.
Locate and click the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Parameters
3.
On the Edit menu, click New, and then click DWORD Value.
4.
Enter the value data when the following registry value is displayed:
Value Name: Schema Update AllowedData Type: REG_DWORDBase: BinaryValue Data: Type 1 to enable this feature, or 0 (zero) to disable it.
5.
Quit Registry Editor.
Follow these steps to configure attributes
27. Enter the following in the Empty box and Click Add
3,&ROLL NUMBER, c:\EnterAttrib.vbs
Note:
3 is the serial number
&ROLL NUMBER is the Attribute which will appear in User and Computers context Menu
C:\EnterAttrib.vbs is the script which will add the value to attribute
Please do not change the Syntax
Dim oVar
Dim oUsr
Dim tmp
Set oVar = Wscript.Arguments
Set oUsr = GetObject(oVar(0))
tmp = InputBox("The Roll Number of the user is: " & oUsr.ROLLNUMBER & vbCRLF & vbCRLF & “Enter the new Roll Number Below“)
if tmp <> "" then oUsr.Put "ROLLNUMBER",tmp
oUsr.SetInfo
Set oUsr = Nothing
WScript.Quit
Use ADSIEdit to select the Configuration namespace.
Expand the displaySpecifier container.
Expand the appropriate displaySpecifier container. For example, "409" is English.
View the Properties for the user-Display object.
Modify the attributeDisplayNames attribute by adding a value in the format:
Your_new_Attribute,friendly_name
For example, "Roll Number" looks like this:
ROLLNUMBER,Roll Number