Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

README.md

WindowsCredentialVault

What this for?

This module allows you to handle your credential with Windows Credential Manager.

It used to be requires P/Invoke to handle Windows Credential Manager. > PInvoke.Net

However there are PasswordVault class for Windows 8 StoreApops in .NET framework and it allows not only StoreApps but also PowerShell to manage their Credential super easy.

Usage

Set Credential

Below sample code will save your Credential as hoge.

Set-WindowsCredential -ResourceName hoge -Credential (Get-Credential)

Get Credential

Get-WindowsCredential -ResourceName hoge

This retrieve all user credential for ResourceName 'hoge'.

UserName                                                                             Password
--------                                                                             --------
hoge                                                             System.Security.SecureString

You can specify username for the Resource.

Get-WindowsCredential -ResourceName hoge -UserName hoge

Want to retrieve all credentials? Use -All switch.

Get-WindowsCredential -All

Test Credential is exist

You can test if credential is exist or not.

Test-WindowsCredential -ResourceName hoge

If credential is exist then true will be return. If not false will return.

You can specify Resource and UserName.

Test-WindowsCredential -ResourceName hoge -UserName hoge

Remove Credential

You can remove credential.

Remove-WindowsCredential -ResourceName hoge -UserName hoge

If you want to remove all credential in ResourceName, then use -All switch.

Remove-WindowsCredential -ResourceName hoge -All

Tips

As PasswordVault use Windows.Security.Credentials.PasswordCredential, this module convert to/from PSCredential.

ComvertTo-PasswordCredential

Convert PSCredential TO Windows.Security.Credentials.PasswordCredential.

ConvertTo-PasswordCredential -Credential (Get-Credential) -ResourceName hoge

ComvertFrom-PasswordCredential

Convert Windows.Security.Credentials.PasswordCredential to PSCredential.

ConvertFrom-PasswordCredential -Credential $Credential

About

Windows 8 Store App style Windows Credential Management Module for Windows PowerShell

Resources

License

Packages

No packages published
You can’t perform that action at this time.