Writing a .Net 4 C# console application to add/update Active Directory user objects.
I am using the DirectoryEntry. Rename method to rename the cn property of user objects.
If I understand the MS documentation for the Rename method - - If UsePropertyCach e is true (which is the default) then I need to call CommitChanges on the object to make the rename action permanent.
However, When I execute the following code - the Rename action becomes permanent without a CommitChanges.
Any advice on this would be appreciated?
I am using the DirectoryEntry. Rename method to rename the cn property of user objects.
If I understand the MS documentation for the Rename method - - If UsePropertyCach e is true (which is the default) then I need to call CommitChanges on the object to make the rename action permanent.
However, When I execute the following code - the Rename action becomes permanent without a CommitChanges.
Code:
DirectoryEntry Uentry = result.GetDirectoryEntry(); Uentry.Rename("cn=" + newValue);
Comment