我添加用户时是这样添加的
userEntry.Properties["Sn"].Value = "ab";//姓
userEntry.Properties["GivenName"].Value = "ab";//名
userEntry.Properties["Department"].Value = "ab";////部门
userEntry.Properties["Title"].Value = "ab";//职位
userEntry.Properties["telephoneNumber"].Value = 12342423;//电话
userEntry.Properties["Mail"].Value = "ab@ab.com";//email
userEntry.Properties["userPrincipalName"].Value = "ab";//登录名
userEntry.Properties["sAMAccountName"].Value = "ab";
userEntry.Properties["UserPassWord"].Add("ABcd123");
userEntry.Properties["useraccountcontrol"].Value = 544;//544开启,514关闭
userEntry.Properties["pwdLastSet"].Value = -1;
userEntry.CommitChanges();
userEntry.Invoke("SetPassWord", new object[] { "ABcd123" });
最后一句添加密码的报错,把setpassword换成ChangePassword也不对
请高手指点怎么给用户添加密码啊?还有就是更改用户信息时怎样更改他的组织单元啊