Created
March 29, 2015 19:47
-
-
Save nightroman/cec4cdf0e7a5146c40e7 to your computer and use it in GitHub Desktop.
Get, export, and import credential
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
# credential file path | |
$CredentialPath = "$PSScriptRoot\credential.clixml" | |
# get and export credential | |
$credential = Get-Credential | |
$credential | Export-Clixml -LiteralPath $CredentialPath | |
# import credential | |
$credential = Import-Clixml -LiteralPath $CredentialPath | |
$credential |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment