Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "password" | ConvertTo-SecureString -AsPlainText -Force |
- ConvertFrom-SecureString
- $password = "(the long string generated from above command)"
- $username = "Test@testdomain.com"
- $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $username,($password | ConvertTo-SecureString)
- ConvertFrom-SecureString
- $Password = "password" | ConvertTo-SecureString -AsPlainText -Force
- $username = "Test@testdomain.com"
- $cred = New-Object System.Management.Automation.PsCredential($username, $Password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement