Guest User

Untitled

a guest
Jul 17th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. (Get-Credential).Password |ConvertFrom-SecureString | out-file "C:\Automation\secret.txt"
  2. $pwd = Get-Content "C:\Automation\secret.txt" | ConvertTo-SecureString
  3. $mycreds = New-Object System.Management.Automation.PSCredential (“username”, $pwd)
Add Comment
Please, Sign In to add comment