Setting a password using SecureString

Why System.DirectoryServices.AccountManagement.UserPrincipal.SetPassword()

doesn't it accept System.Security.SecureString

for a new password? Is there any other approach to changing the password that is using SecureString

?

+3


source to share


1 answer


SecureString

Unfortunately, not all .NET password processing APIs use . Not sure why as the class is SecureString

preceded by DirectoryServices.AccountManagement.UserPrincipal

multiple versions.



You can use the PowerShell cmdlet Set-ADAccountPassword

that takes SecureString

.

+2


source







All Articles