Get replication value meta data with DirectorySearcher for large ADGroups


  • I'm trying to get the replication value meta data from an ADGroup with over 20.000 members. Here's the code:

    const string replicationData = "msDS-ReplValueMetaData";
    var directoryEntry = new DirectoryEntry($"LDAP://{dn}");
    var directorySearcher = new DirectorySearcher(directoryEntry, null, new string[] { replicationData });
    var propertyResultCollection = (directorySearcher.FindOne()).Properties[replicationData];
    It works pretty fine for small groups but if the groups have too much members i just receive an empty collection.
    Wednesday, April 26, 2017 2:11 PM