string[] prop = new string[] {
"DisplayName", "SamAccountName", "UserPrincipalName", "userAccountControl", "givenName", "sn",
"name", "Initials", "description", "physicalDeliveryOfficeName", "telephoneNumber", "mail",
"wWWHomePage", "WhenCreated", "streetAddress", "postOfficeBox",
"l", "st", "postalCode", "co", "homePhone", "Pager", "mobile", "facsimileTelephoneNumber",
"ipPhone", "UserWorkstations", "company", "department", "Title", "Manager", "AccountExpires",
"PwdLastSet", "DistinguishedName" , whenChanged,lastLogoff,lastLogon,pwdLastSet,primaryGroupID,logonCount,objectCategory };
部分取值示意值
DateTime.FromFileTime(PwdLastSet).ToString()
lastLogoff:退出次数
AccountExpires:9223372036854775807 表示2的64次方减1,也就是无限制。
logonCount:14
primaryGroupID 513
lastLogon 131779032897812500
pwdLastSet 131778177763349609
objectCategory CN=Person,CN=Schema,CN=Configuration,DC=qmx,DC=com
userAccountControl:512 表示 正常,详见 https://blog.csdn.net/seanzed/article/details/77619985
DistinguishedName: CN=kevin,OU=HR,DC=qmx,DC=com
PATH:LDAP://qmx.com/CN=kevin,OU=HR,DC=qmx,DC=com
whenChanged:2018/8/5 0:54:58
启明星系统部分字段映射表。例如在AD域里,电话号码是“physicalDeliveryOfficeName”,在启明星系统里使用“Tel”字段。
string[] tableColumn = new string[] {
"FirstName",
"LastName",
"DisplayName",
"LoginName",
"Initials",
"Description",
"Office",
"Tel",
"Mail",
"Homepage",
"HomePhone",
"Mobile",
"Fax",
"ipPhone",
"Company",
"Dept",
"Title",
"ADPath",
"Status",
"LogonCount",
"LastChangedDate"
}; string[] adprop = new string[] {
"sn",
"givenName",
"DisplayName",
"SamAccountName",
"Initials",
"description",
"physicalDeliveryOfficeName",
"telephoneNumber",
"mail",
"wWWHomePage",
"homePhone",
"mobile",
"facsimileTelephoneNumber",
"ipPhone",
"company",
"department",
"Title",
"Path",
"userAccountControl",
"LogonCount",
"whenChanged"
};