Skip navigation

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

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   Syntax
assistant        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 roomNumber

returns:

AdFind V01.26.00cpp Joe Richards ([email protected]) February 2005

Using server: jsi001.JSIINC.COM
Directory: Windows Server 2003

dn: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: Lee


1 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  roomNumber
CN=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



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish