Created
March 10, 2017 01:40
-
-
Save adamdriscoll/7cbe8ca2c1d7ebbc026a74f1b48a2426 to your computer and use it in GitHub Desktop.
Rename Object 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 request = new ModifyDNRequest | |
{ | |
DeleteOldRdn = true, | |
DistinguishedName = dn, | |
NewName = "CN=" + newCn | |
}; | |
var response = connectionObject.SendRequest(request); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment