Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. using DirectorySearcher to get Group members

using DirectorySearcher to get Group members

Scheduled Pinned Locked Moved C#
com
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    caiena
    wrote on last edited by
    #1

    how could i change this code to use the DirectorySearcher to get me all members in the group the reason i want to use the DirectorySearcher is because i can set the PageSize so i can get more than 1,000 users currently all these groups have over 2,000 users public static ArrayList testGetUsers() { ArrayList excludeGroups = new ArrayList(); ArrayList users = new ArrayList(); DirectoryEntry group; excludeGroups.Add("CN=GMDPortal,OU=IT,OU=ADM,DC=corp,DC=ad,DC=ejhospital,DC=com"); excludeGroups.Add("CN=GService,OU=SysServices,DC=corp,DC=ad,DC=ejhospital,DC=com"); excludeGroups.Add("CN=GTrain,OU=Training,OU=ADM,DC=corp,DC=ad,DC=ejhospital,DC=com"); excludeGroups.Add("CN=GITLevSvcs,OU=LevSvcs,OU=IT,OU=ADM,DC=corp,DC=ad,DC=ejhospital,DC=com"); foreach (string DEgroup in excludeGroups) { group = new DirectoryEntry("LDAP://" + DEgroup); foreach (object dn in group.Properties["member"]) { users.Add(dn); } } return users; }

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups