Answer the question
In order to leave comments, you need to log in
Password protection in powershell script
Good afternoon!
There is a task of database backup from one computer to another.
One computer in the domain, the second in the workgroup.
To connect the disk with the database, certain credentials are used (login - password).
I would like to protect these credentials as much as possible from prying eyes.
Is it possible to somehow encrypt the password used in PowerShell scripts?
so far found the use of ConvertTo-SecureString and reading data from a file. But there the password is also stored in clear text ... Here is such a trick ...
Answer the question
In order to leave comments, you need to log in
Try looking towards the crypto API
www.sysadmins.lv/PermaLink ,guid,1cec0947-9113-4de2-bf48-809a09849f4c.aspx
I solved the problem of logging in to the shares of a non-domain home machine from a domain laptop brought home simply - if the loginname + password pair matches on both machines, the user is considered authentic and authorized, i.e.
local-non-domain-pc1\username + "password" = domain-pc2\username + "password"
and even gets admin privileges if they are available.
I didn’t think about encrypting the file itself ...
But I used the same construction) It’s just embarrassing that by copying the $File file, you can do the same on any other computer.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question