Advertisement
Guest User

Untitled

a guest
Sep 25th, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #Encrypting password on machine 1
  2. $File = "\Machine1SharedPathPassword.txt"
  3. [Byte[]] $key = (1..16)
  4. $Password = "P@ssword1" | ConvertTo-SecureString -AsPlainText -Force
  5. $Password | ConvertFrom-SecureString -key $key | Out-File $File
  6.  
  7. #Accessing the password on machine 2
  8. $File = "\Machine1SharedPathPassword.txt"
  9. [Byte[]] $key = (1..16)
  10. Get-Content $File | ConvertTo-SecureString -Key $key
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement