Last active
September 7, 2022 03:44
-
-
Save davefunkel/dd7376a2438573b4081932b5282de1b5 to your computer and use it in GitHub Desktop.
Embedded Credentials in a PowerShell Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$username = "[email protected]" | |
$password = "Password123!@#" | |
$secureStringPwd = $password | ConvertTo-SecureString -AsPlainText -Force | |
$creds = New-Object System.Management.Automation.PSCredential -ArgumentList $user, $secureStringPwd |
Can you please update the documentation to be correct?
$username = "[email protected]"
$password = "Password123!@#"
$secureStringPwd = $password | ConvertTo-SecureString -AsPlainText -Force
$creds = New-Object System.Management.Automation.PSCredential -ArgumentList $username, $secureStringPwd
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey Dave,
Thank you for this.
Just thinking, the $user variable in the last line should prolly be $username no?