try { // change password System.Diagnostics.Process.Start("net.exe", "user administrator " + "NewPasswordHere"); } catch (Exception) { }
Notes
String 0ADSPath = “LDAP://onecity/CN=Users,
DC=onecity,DC=corp,DC=fabrikam,DC=com”;
DirectoryEntry oDirectoryEntry = new DirectoryEntry(oADSPath);
oDirectoryEntry.Username = UserName;
oDirectoryEntry.Password = SecureStringStoredPassword;