Advertisement
Guest User

Untitled

a guest
Jan 31st, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. "password" | ConvertTo-SecureString -AsPlainText -Force |
  2. ConvertFrom-SecureString
  3.  
  4. $password = "(the long string generated from above command)"
  5. $username = "Test@testdomain.com"
  6.  
  7. $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $username,($password | ConvertTo-SecureString)
  8.  
  9. ConvertFrom-SecureString
  10.  
  11. $Password = "password" | ConvertTo-SecureString -AsPlainText -Force
  12. $username = "Test@testdomain.com"
  13. $cred = New-Object System.Management.Automation.PsCredential($username, $Password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement