0
A
回答
0
這在AD中是不可能的。您需要使用適當的過濾器來查詢LDAP並計算結果。在某些LDAP實現中存在一個numSubordinates
屬性,它將告訴您特定對象下有多少個對象,但AD不支持它。你可以得到最接近的是msDS-Approx-Immed-Subordinates。
但是,即使上述屬性之一可用,也無法區分計數中的下級對象的類型。除非您可以保證只有用戶/組駐留在目錄中的特定結構下,而沒有其他內容。
+0
謝謝。這有助於某種方式。 – gimbup
相關問題
- 1. 獲取Active Directory中的用戶組
- 2. 獲取Active Directory中的所有用戶
- 3. 使用GroupPrincipal從Active Directory中的組獲取所有用戶
- 4. 獲取Active Directory組中的所有用戶
- 5. 從Active Directory中的組獲取所有用戶和聯繫人
- 6. 獲取Active Directory組中的所有用戶
- 7. .NET Active Directory - 獲取特定Active Directory組中的用戶列表
- 8. 從Active Directory組獲取用戶
- 9. 從Active Directory PrincipalContext獲取所有用戶
- 10. 從Active Directory獲取所有用戶?
- 11. 使用Active Directory獲取組中的所有用戶電子郵件c#
- 12. ASP.NET用戶不顯示所有的Active Directory組
- 13. 如何獲取屬於Active Directory中的組的用戶?
- 14. 閱讀SharePoint中的Active Directory組用戶
- 15. Active Directory中的用戶/組權限
- 16. 列出Active Directory中同一級別的兩個組中的所有用戶
- 17. 以遞歸方式獲取.NET Azure Active Directory組中的所有用戶
- 18. 獲取Active Directory中的用戶列表
- 19. 如何刪除Active Directory組中的所有用戶?
- 20. 如何獲取用戶所屬的Active Directory中的所有用戶組,PHP(連接到LDAP目錄)
- 21. 如何獲取Active Directory中的用戶組?
- 22. 獲取c#中Active Directory組的用戶名稱
- 23. 如何獲取Active Directory中的用戶組? (c#,asp.net)
- 24. 從Active Directory讀取用戶授權組
- 25. 將Active Directory子域用戶添加到主域組
- 26. 獲取Active Directory中所有用戶的密碼信息
- 27. 使用PHP獲取Active Directory組的用戶列表
- 28. Active Directory中的域用戶無法獲得用戶?
- 29. Active Directory用戶組成員組主體
- 30. 獲取用戶帳戶Windows 8應用程序中的Active Directory組
這可能可以幫助你:[使用PrincipalSearcher獲取AD組成員數量](http://stackoverflow.com/questions/35089911/get-count-of-members-in-a-ad- group-using-principalsearcher) –
上面的這個鏈接在獲得計數之前仍然會加載所有用戶。 – gimbup
沒有枚舉集合,沒有辦法在內部或外部進行計數。計數的概念是枚舉一個集合。例如,如果我有一羣學生,甚至是學生.Count會以其他方式在內部完成所有學生。 另一個例子是一個C#DataSet RowCount。如果你有很多記錄,只需要問它需要一定的時間。猜猜爲什麼 ? –