Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Encrypting password on machine 1
- $File = "\Machine1SharedPathPassword.txt"
- [Byte[]] $key = (1..16)
- $Password = "P@ssword1" | ConvertTo-SecureString -AsPlainText -Force
- $Password | ConvertFrom-SecureString -key $key | Out-File $File
- #Accessing the password on machine 2
- $File = "\Machine1SharedPathPassword.txt"
- [Byte[]] $key = (1..16)
- Get-Content $File | ConvertTo-SecureString -Key $key
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement