Notes for Powershell credentials
Here are some dirty ways to store user credentials in powershell.
Get-Credential | Export-Clixml C:\path\to\output\file.xml
The same user, on the same machine, that generates that file can retrieve the contents with
$credential = Import-Clixml C:\path\to\output\file.xml
Change password
2022-03-18
Set-ADAccountPassword -Identity bgstack15 -OldPassword (ConvertTo-SecureString -AsPlainText "OldPwGoesHere" -Force) -NewPassword (ConvertTo-SecureString -AsPlainText "NewPlainTextPw" -Force)
Comments