Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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
You can’t perform that action at this time.