Skip to content
This repository has been archived by the owner on Aug 1, 2020. It is now read-only.

Secure encryption and decryption of credentials in PowerShell with SecureString

License

Notifications You must be signed in to change notification settings

BornToBeRoot/PowerShell_ManagedCredential

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repo archived because secure string shouldn't be used anymore :)

See https://github.com/dotnet/platform-compat/blob/master/docs/DE0001.md

PowerShell - ManagedCredential

Secure encrpytion and decryption of credentials in PowerShell.

Description

Module and script for secure encrpytion and decryption of credentials in PowerShell. Encrypted credentials can be stored in an xml-file or variable and be decrypted from there.

This function uses the SecureString Class from the .NET-Framework. Once encrypted credentials, can only be decrypted by the same user and on the same computer.

SecureString

If user "A" encrypt the credentials on computer "A", user "B" cannot decrypt the credentials on computer "A" and also user "A" cannot decrypt the credentials on Computer "B".

Module

How to install the module?

  1. Download the latest Release
  2. Copy the folder Module\ManagedCredential to C:\Users\%username%\Documents\WindowsPowerShell\Modules\
  3. Open up a PowerShell as an admin and set the execution policy: Set-ExecutionPolicy RemoteSigned
  4. Import the Module with the command Import-Module ManagedCredential (Maybe add this command to your PowerShell profile)

Available functions:

Function Description Help
New-ManagedCredential Secure encryption of credentials as SecureString 📖
Get-ManagedCredential Secure decryption of encrypted credentials 📖

Scripts

Function Description Help
New-ManagedCredential.ps1 Secure encryption of credentials as SecureString 📖
Get-ManagedCredential.ps1 Secure decryption of encrypted credentials 📖

Encrypted xml-file

Screenshot

About

Secure encryption and decryption of credentials in PowerShell with SecureString

Resources

License

Stars

Watchers

Forks

Packages

No packages published