Skip to content

Instantly share code, notes, and snippets.

@darrenjrobinson
Created September 14, 2017 04:07
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/d56585e10730fd044dc3272ee9911753 to your computer and use it in GitHub Desktop.
Save darrenjrobinson/d56585e10730fd044dc3272ee9911753 to your computer and use it in GitHub Desktop.
Connect to an Azure KeyVault using the AxCredentialVault Module
# Import the Module
Import-Module AxCredentialVault -MinimumVersion 1.0.5
# Location of the Keyvault 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
# *********Connect to Key Vault**********
$AzCredVault = Connect-AzureCredentialVault -Credential $creds -SubscriptionID $AzureRM.Context.Subscription.Id -ResourceGroupName $name -StorageAccountName $name.ToLower() -VaultName $name -Verbose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment