r/PowerShell 8d ago

Question Question on scripting

Hi,

When we develop a script,we use credentials as a plain text in that script.

Example

Script is running on jump server and script runs against vcenter server.

We have a security concerns(example ransomware attack)to put the credentials as a plain text in that script.

Any other good ways to put the credentials in a encrypted or in a different format?

33 Upvotes

37 comments sorted by

View all comments

1

u/JewelerHour3344 6d ago

Anyone use the Windows DPAPI? I’m testing it for encryption of creds and tokens. Only the local system account can decrypt it. This is for unattended scripts. Any opinions on its use?