I am trying to change the password of a particular user you can find code below
var directoryEntryObject = new DirectoryEntry("LDAP://<IP>","administraor", "password");
baseObject.directoryEntryObject.Invoke("SetPassword", new object[] { "test@123" });
baseObject.directoryEntryObject.Properties["LockOutTime"].Value = 0;
baseObject.directoryEntryObject.Close();
Now i am getting below Error ::
Unknown name. (Exception from HRESULT: 0x80020006 (DISP_E_UNKNOWNNAME))
administraor -> is this the real username you are trying? Check the spelling of the username, it is administrator.
If you just typed here with this mistake, try
var directoryEntryObject =
new DirectoryEntry("LDAP://<IP>/Dc=domain,DC=local","administrtaor", "password");
User contributions licensed under CC BY-SA 3.0