[英]C# Active Directory - Migrate to System.DirectoryServices.AccountManagement
[英]Setting Active Directory user login name post Windows 2000 with System.DirectoryServices.AccountManagement
我如何使用System.DirectoryServices.AccountManagement
屏幕截圖(在Windows 2000之后)下面紅色標記的用戶登錄名?
用戶是從UserPrincipal
對象創建的,但是我看不到任何屬性或mutator方法可以這樣做:
using (var user = new UserPrincipal(context)) {
user.SamAccountName = samAccountName;
user.GivenName = fname;
user.Surname = lname;
user.EmailAddress = email;
user.SetPassword(password);
user.Enabled = true;
user.Save();
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.