Provision a Key Vault

This script deploys a simple Key Vault without any Access Policies.

Register-AzResourceProvider -ProviderNamespace "Microsoft.KeyVault"


#set the variables required for the Key Vault
$kvName = "allensKeyVault04"
$rgname = "rg-allen"
$location = "southafricanorth"
$sku = "standard"


#provision the Key Vault with optional tags
New-AzKeyVault -Name $kvName -ResourceGroupName $rgname `
-Location $location -sku $sku -SoftDeleteRetentionInDay 7 `
-Tag @{Application="SQL Insights";Clientname="Allen";Resource="Key Vault"} 

2 comments

  1. Nice read, I just passed this onto a colleague who was doing some research on that. And he actually bought me lunch since I found it for him smile So let me rephrase that: Thank you for lunch! “Any man would be forsworn to gain a kingdom.” by Roger Zelazny.

Leave a comment

Your email address will not be published. Required fields are marked *