Skip to content

Instantly share code, notes, and snippets.

@darrenjrobinson
Created September 14, 2017 03:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darrenjrobinson/d1f36ed8880cb7b5c431ac9a806a51c8 to your computer and use it in GitHub Desktop.
Save darrenjrobinson/d1f36ed8880cb7b5c431ac9a806a51c8 to your computer and use it in GitHub Desktop.
Create Azure Key Vault using the AxCredentialVault module
# Install the CredentialVault PS Module
Install-Module AxCredentialVault -Force -MinimumVersion 1.0.5
# Import the Module
Import-Module AxCredentialVault -MinimumVersion 1.0.5
# Location for Resources
$location = "australiaeast"
# Name for RG, SG and Vault
$name = "DevelopmentMIMKeyVault"
# prompt for Azure credentials
$creds = Get-Credential
# Connect to Azure Resource Manager
$AzureRM = Add-AzureRmAccount -Credential $creds
# *********Create Key Vault**********
$AzCredVault = New-AzureCredentialVault -Credential $creds -SubscriptionID $AzureRM.Context.Subscription.Id -ResourceGroupName $name -StorageAccountName $name.ToLower() -Location $location -VaultName $name -Verbose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment