I am trying to add a certificate to an Azure Key Vault using Azure CLI. I'm following the documentation here and the quickstart here. Both pages say the command to generate a certificate is:
az keyvault certificate create --vault-name vaultname -n cert1 -p "$(az keyvault certificate get-default-policy)"
I have this exact line in my script:
az keyvault certificate create --vault-name $keyVault -n $certName -p "$(az keyvault certificate get-default-policy)"
I get the following exception every time I run it. Am I missing something obvious here?
az : Expecting property name enclosed in double quotes: line 1 column 5 (char 4)