While changing a domain administrator’s password in Windows PowerShell on a domain controller, I ran into a paste problem with Read-Host -AsSecureString. Typing a password manually worked, but pasting into the hidden prompt left the variable empty. Reading the clipboard with Get-Clipboard and converting its contents to a SecureString worked in the same session.
This is the procedure I used. It changes the password of the currently signed-in domain account and requires its existing password.
(more…)



