0
我有一個Active Directory用戶DirectoryEntries的集合,我需要獲取與每個相關的街道地址。我使用的線沿線的東西:檢索Active Directory DirectoryEntry的街道地址屬性
bool TryGetPropertyValue(DirectoryEntry de, string propertyName, out string propertyValue)
{
if (de.Properties.Contains(propertyName) && de.Properties[propertyName].Count > 0)
{
propertyValue = de.Properties[propertyName][0].ToString();
return true;
}
propertyValue = string.Empty;
return false;
}
但我找不到propertyName
值就會得到用戶的地址。有人存在嗎,還是有另一種獲得這些信息的方式?
請看看http://stackoverflow.com/questions/5058261/how-to-get-update-contacts-within-active-directory – Tariqulazam
「Address」,「Address-Home」,「Registered-Address 「和」街道地址「是Windows AD中用戶類的地址相關項目,您可以嘗試其中一種。完整的列表可以在這裏找到:http://msdn.microsoft.com/en-us/library/ms683980(v=VS.85).aspx – Falle1234