为什么System.DirectoryServices.AccountManagement.UserPrincipal.SetPassword()不使用System.Security.SecureString作为新密码?是否有另一种方法可以使用SecureString更改密码?
发布于 2014-11-08 01:25:59
不幸的是,并非.NET中的所有密码处理API都使用SecureString。不知道为什么,因为SecureString类比DirectoryServices.AccountManagement.UserPrincipal早几个版本。
您可以使用PowerShell cmdlet Set-ADAccountPassword,它确实需要一个SecureString。
https://stackoverflow.com/questions/26681163
复制相似问题