This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Export-PSCredential | |
{ | |
<# | |
.SYNOPSIS | |
Exports a credential object into an XML file or registry value with an encrypted password. An important note is that the encrypted password can ONLY be read by the user who created the exported file | |
unless a passphrase is provided. | |
.PARAMETER Credential | |
Specifies the Credential to export to a file. Use Get-Credential to supply this. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Import-PSCredential | |
{ | |
<# | |
.SYNOPSIS | |
Imports a credential exported by Export-PSCredential and returns a Credential. | |
.PARAMETER Path | |
Specifies one or more files to convert from XML files to credentials. | |
.PARAMETER RegistryPath |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-EncryptionKey() | |
{ | |
<# | |
.SYNOPSIS | |
Retrieves a 128/192/256-bit encryption key using the given keyphrase. | |
.PARAMETER KeyPhrase | |
Specifies the phrase to use to create the 128-bit key. | |
.PARAMETER Length |
NewerOlder