JSI Tip 9642. The Active Directory schema defines 9 attributes for users that are NOT available in the GUI?

Jerold Schulman

August 16, 2005

1 Min Read
ITPro Today logo in a gray background | ITPro Today

The Active Directory schema defines the following 9 attributes for users, that are NOT available in the Active Directory Users and Computers GUI:

Attribute Name   Syntaxassistant        Object(DS-DN)carLicense       String(Unicode)comment          String(Unicode)division         String(Unicode)employeeID       String(Unicode)employeeNumber   String(Unicode)employeeType     String(Unicode)middleName       String(Unicode)roomNumber       String(Unicode)

If you wanted to use these attributes, you could use AdMod freeware to maintain them, and AdFind freeware to retrieve them.

Example:

admod -b "CN=Test1 Test1,CN=Users,DC=JSIINC,DC=COM" "assistant::CN=New Test2,CN=Users,DC=JSIINC,DC=COM"admod -b "CN=Test1 Test1,CN=Users,DC=JSIINC,DC=COM" "CarLicense::XYZ 987"admod -b "CN=Test1 Test1,CN=Users,DC=JSIINC,DC=COM" "Comment::This is a comment."admod -b "CN=Test1 Test1,CN=Users,DC=JSIINC,DC=COM" "division::Corporate"admod -b "CN=Test1 Test1,CN=Users,DC=JSIINC,DC=COM" "EmployeeID::1"admod -b "CN=Test1 Test1,CN=Users,DC=JSIINC,DC=COM" "EmployeeNumber::0444"admod -b "CN=Test1 Test1,CN=Users,DC=JSIINC,DC=COM" "EmployeeType::1"admod -b "CN=Test1 Test1,CN=Users,DC=JSIINC,DC=COM" "middlename::Lee"admod -b "CN=Test1 Test1,CN=Users,DC=JSIINC,DC=COM" "roomnumber::2A"adfind -b "CN=Test1 Test1,CN=Users,DC=JSIINC,DC=COM" assistant carLicense comment division employeeID employeeNumber employeeType middleName roomNumberreturns:AdFind V01.26.00cpp Joe Richards ([email protected]) February 2005Using server: jsi001.JSIINC.COMDirectory: Windows Server 2003dn:CN=Test1 Test1,CN=Users,DC=JSIINC,DC=COM>employeeNumber: 0444>employeeType: 1>employeeID: 1>comment: This is a comment.>division: Corporate>assistant: CN=New Test2,CN=Users,DC=JSIINC,DC=COM>roomNumber: 2A>carLicense: XYZ 987>middleName: Lee1 Objects returned

You can also use DSQUERY to retieve the data:

dsquery * domainroot -filter "(&(objectCategory=Person)(objectClass=User)(sAMAccountName=Test1))" -attr distinguishedName assistant carLicense comment division employeeID employeeNumber employeeType middleName roomNumber -limit 0  distinguishedName                          assistant                               carLicense  comment             division   employeeID  employeeNumber    employeeType  middleName  roomNumberCN=Test1 Test1,CN=Users,DC=JSIINC,DC=COM   CN=New Test2,CN=Users,DC=JSIINC,DC=COM  XYZ 987     This is a comment.  Corporate  1           0444              1             Lee         2A



Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like