List of common LDAP AD fields which can be used with the “DSQuery” or other tools which lookup AD objects.
csvde -m -f c:\DSQueryUsers.csv -d "OU=Users,OU=UK,DC=domain,DC=localm" -r "(&(objectClass=*)(mail=*))" -l displayName,userPrincipalName |
In order to simplify the process of creating LDAP queries you can use the SysInternals “Active Directory Explorer” tool to help with this process.
See Below for table:
Label in AD Users and Computers | LDAP provider property name | WinNT provider property name |
Name | cn | |
First name | givenName | |
Initials | initials | |
Last name | sn | |
Display name | displayName | fullName |
Description | description | description |
Office | physicalDeliveryOfficeName | |
Telephone number | telephoneNumber | |
Other Telephone numbers | otherTelephone | |
Web page | wWWHomePage | |
Other Web pages | url | |
Address | ||
Street | streetAddress | |
P.O. Box | postOfficeBox | |
City | l | |
State/province | st | |
Zip/Postal Code | postalCode | |
Country/region | c, co, countryCode | |
Account | ||
User logon name | userPrincipalName | |
pre-Windows 2000 logon name | sAMAccountName | name |
Account disabled? | userAccountControl | |
Logon Hours | logonHours | |
Logon On To (Logon Workstations) | userWorkstations | |
User must change password at next logon | pwdLastSet | |
User cannot change password | userAccountControl | |
Password never expires | userAccountControl | |
Store password using reversible encryption | userAccountControl | |
Account expires end of (date) | accountExpires | |
Profile | ||
User Profile path | profilePath | profile |
Logon script | scriptPath | loginScript |
Home folder, local path | homeDirectory | homeDirectory |
Home folder, Connect, Drive | homeDrive | homeDirDrive |
Home folder, Connect, To: | homeDirectory | homeDirectory |
Telephones | ||
Home | homePhone | |
Other Home phone numbers | otherHomePhone | |
Pager | pager | |
Other Pager numbers | otherPager | |
Mobile | mobile | |
Other Mobile numbers | otherMobile | |
Fax | facsimileTelephoneNumber | |
Other Fax numbers | otherFacsimileTelephoneNumber | |
IP phone | ipPhone | |
Other IP phone numbers | otherIpPhone | |
Notes | info | |
Organisation | ||
Title | title | |
Department | department | |
Company | company | |
Manager | manager | |