1
我想使用VB.NET在Active Directory中添加用戶配置文件配置文件路徑信息DirectoryServices.AccountManagement
但似乎無法做到這一點。我可以添加我需要的所有其他字段,包括與配置文件路徑位於同一選項卡中的登錄腳本。DirectoryServices.AccountManagement用戶配置文件配置文件路徑
我一直在尋找UserPrincipal at MS,但我無法看到與配置文件路徑相關的任何內容。
相關代碼:
Dim ctx As New PrincipalContext(ContextType.Domain, "sometext", "OU=Domain Objects,DC=sometext,DC=local")
Dim user As New UserPrincipal(ctx, "NewUser", "[email protected]", True)
user.GivenName = "GivenName"
user.Surname = "Surname"
user.HomeDirectory = "\\MyHomeDirectory\"
user.HomeDrive = "Z:"
user.ExpirePasswordNow()
user.Save()