Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (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)
Add Comment
Please, Sign In to add comment