Skip to content

Instantly share code, notes, and snippets.

@ChabaOk

ChabaOk/KeyVault-Simple.ps1 Secret

Created Nov 9, 2017
Embed
What would you like to do?
Login-AzureRmAccount
$MyKeyVaultName = 'vm360degreekeyvault'
$mySecretPasswordDB = 'passworddb'
New-AzureRmKeyVault -VaultName $MyKeyVaultName -ResourceGroupName 'rgWestUS2' -Location 'westus2'
Get-AzureRmKeyVault -VaultName $MyKeyVaultName
Set-AzureKeyVaultSecret -VaultName $MyKeyVaultName -Name 'passworddb' `
-SecretValue (ConvertTo-SecureString -String 'p@ssw0rd' -AsPlainText -Force)
get-AzureKeyVaultSecret -VaultName $MyKeyVaultName -Name $mySecretPasswordDB | fl *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.