🔐 A simple credential manager to store and reuse multiple PSCredential objects.
Go to file
2017-10-20 10:38:47 +02:00
.vscode Publish Pre-release (#1) 2017-09-21 13:32:15 +02:00
bin Publish Pre-release (#1) 2017-09-21 13:32:15 +02:00
docs Set theme jekyll-theme-modernist 2017-09-28 11:10:55 +02:00
resources Publish Pre-release (#1) 2017-09-21 13:32:15 +02:00
src Adds connection type CisServer 2017-10-20 10:35:56 +02:00
tests Publish Pre-release (#1) 2017-09-21 13:32:15 +02:00
tools Publish Pre-release (#1) 2017-09-21 13:32:15 +02:00
.gitignore Publish Pre-release (#1) 2017-09-21 13:32:15 +02:00
appveyor.yml prepare beta build on dev 2017-10-20 10:38:47 +02:00
LICENSE Initial commit 2017-07-27 13:40:00 +02:00
README.md fix typos (#7) 2017-10-16 19:47:19 +02:00

AppVeyor Overall AppVeyor Master AppVeyor Dev Coveralls.io Download
Build status Build status Build status Coverage Status Download

General

The PSCredentialStore is a simple credential manager for PSCredentials. It stores PSCredentials in a simple json file. You can choose between a private and shared credential store. The private one exists in your profile and can ony accessed by your account on the same machine. The shared store enables you to use different credentials for your scripts without exposing them as plain text.

The shared store isn't 100% secure and I don't recommend using it in production!

PSCredentialStore was developed to simplify the delegation of complex powershell scripts. In this case you often need to store credentials for non interactive usage like in scheduled tasks.

For more details read the about_PSCredentialStore page.

Installation

  • Make sure you use PowerShell 4.0 or higher with $PSVersionTable.
  • Use the builtin PackageManagement and install with: Install-Module PSCredentialStore
  • Done. Start exploring the Module with Import-Module PSCredentialStore ; Get-Command -Module PSCredentialStore

Manual Way

  • Take a look at the Latest Release page.
  • Download the PSCredentialStore.zip.
  • Unpack the zip file and put it in your Powershell module path.
    • Don't forget to change the NTFS permission flag in the context menu.
  • Start with Import-Module PSCredentialStore

Quick Start

1. First we need a blank credential store. You can decide between a private or shared store. The private Credential Store can only be accessed with your profile on the machine you created it.

# Private credential store
New-CredentialStore

# Shared credential rtore
New-CredentialStore -Shared

#Shared credential store in custom Location
New-CredentialStore -Shared -Path 'C:\CredentialStore.json'

2. Now you can manage your credential store items:

# This will prompt for credentials and stores it in a private store
New-CredentialStoreItem -RemoteHost 'dc01.myside.local' -Identifier 'AD'

# You can now use it in other scripts like this:
$DCCreds = Get-CredentialStoreItem -RemoteHost 'dc01.myside.local' -Identifier 'AD'
Invoke-Command -ComputerName 'dc01.myside.local' -Credential $DCCreds -ScripBlock {Get-Process}

The credential store contains also a simple function to establish a connection with several systems or protocols. If you have already installed the underlying framework / modules, you can connect these endpoints:

  • CiscoUcs - Establish a connection to a Cisco UCS fabric interconnect.
  • FTP - Establish a connection to a FTP host.
  • NetAppFAS - Establish a connection to a NetApp Clustered ONTAP filer.
  • VMware - Establish a connection to a VMware vCenter or ESXi host.

Here are some basic examples:

Connect-To -RemoteHost "ucs.myside.local" -Type CiscoUcs
Connect-To -RemoteHost "ftp.myside.local" -Type FTP
Connect-To -RemoteHost "fas.myside.local" -Type NetAppFAS
Connect-To -RemoteHost "esx01.myside.local" -Type VMware