-
-
Save am1ru1/e54abc12edfb56f21b08a0ab122a0d7c 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