...
Code Block | ||||
---|---|---|---|---|
| ||||
$plainTextPassword = 'mypassword'
$secureStringPassword = ConvertTo-SecureString $plainTextPassword -AsPlainText -force
$cred = New-Object System.Management.Automation.PSCredential ('MyDomain\MyAccount', $secureStringPassword) |