0
我有以下代碼。我得到一個用戶的目錄條目(strpath)。 然後我得到用戶列出的組。在活動目錄中查找組大小
我怎樣才能獲得每組用戶的數量?
DirectoryEntry myDE = new System.DirectoryServices.DirectoryEntry(strpath);
object obGroups = myDE.Invoke("Groups");
foreach (object ob in (IEnumerable)obGroups)
{
DirectoryEntry obGpEntry = new DirectoryEntry(ob);
GroupsListBox.Items.Add(obGpEntry.Name);
}