Skip to content

Instantly share code, notes, and snippets.

@bdanse
Last active November 4, 2018 13:06
Show Gist options
  • Save bdanse/b508de67f7f6b3c4ef0370b30133d431 to your computer and use it in GitHub Desktop.
Save bdanse/b508de67f7f6b3c4ef0370b30133d431 to your computer and use it in GitHub Desktop.
SetKeyvaultPSCredentialExample
#Single keyvault PSCredential secret
Set-KeyvaultPSCredential -Name 'Name1' -UserName 'domain\user2' -VaultName mykeyvault
#Create multiple keyvault PSCredential secrets based on a hashtable
$hash = @(
@{
Name = 'Name1'
UserName = 'domain\User1'
},
@{
Name = 'Name2'
UserName = 'domain\User2'
}
)
$hash | Set-KeyvaultPSCredential -VaultName mykeyvault
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment