Skip to content

Instantly share code, notes, and snippets.

@davefunkel
Created April 21, 2016 06:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save davefunkel/432e650209d40291a9df5b2ff70637b7 to your computer and use it in GitHub Desktop.
Save davefunkel/432e650209d40291a9df5b2ff70637b7 to your computer and use it in GitHub Desktop.
$username = "reasonable.admin@acme.com.au"
$AESKey = Get-Content $AESKeyFilePath
$pwdTxt = Get-Content $SecurePwdFilePath
$securePwd = $pwdTxt | ConvertTo-SecureString -Key $AESKey
$credObject = New-Object System.Management.Automation.PSCredential -ArgumentList $username, $securePwd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment