Created
July 17, 2018 17:42
-
-
Save h3nryza/ae67c7d669b4845e1b419fe568c7db29 to your computer and use it in GitHub Desktop.
Powershell "secret" password convertion - Unsafe
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
| (Get-Credential).Password |ConvertFrom-SecureString | out-file "C:\Automation\secret.txt" | |
| $pwd = Get-Content "C:\Automation\secret.txt" | ConvertTo-SecureString | |
| $mycreds = New-Object System.Management.Automation.PSCredential (“username”, $pwd) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment