Created
March 10, 2017 01:39
-
-
Save adamdriscoll/38dcf5775f71ec256ee102d70ec11a18 to your computer and use it in GitHub Desktop.
Do Garbage Collection LDAP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var connectionObject = new LdapConnection(new LdapDirectoryIdentifier(controller), new NetworkCredential(username, password)); | |
var directoryAttributeModification = new DirectoryAttributeModification(); | |
directoryAttributeModification.Name = "doGarbageCollection"; | |
directoryAttributeModification.Operation = DirectoryAttributeOperation.Add; | |
directoryAttributeModification.Add("1"); | |
connectionObject.SendRequest(new ModifyRequest | |
{ | |
DistinguishedName = "", | |
Modifications = | |
{ | |
directoryAttributeModification | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment