Summary: Learn to convert a plain text password to a secure string for cmdlet parameters.
I'm trying to convert some scripts to work with the Active Directory modules,
but they need a secure string for the password. How do I create one of these?
Use the ConvertTo-SecureString cmdlet, capture the output, then
supply the new variable as SecureString for the password:
$SecurePassword=ConvertTo-SecureString 'MySuperSecretP@ssw0rd!' –asplaintext –force