Reputation: 12663
I want to create a new version of a certificate in keyvaule using command line (az cli or powershell). Does anyone know how to do that?
Upvotes: 1
Views: 2806
Reputation: 42123
To create a new version, just use Add-AzKeyVaultCertificate
powershell command, specify the name of the certificate, then it will create a new version.
Sample:
$Policy = New-AzKeyVaultCertificatePolicy -SecretContentType "application/x-pkcs12" -SubjectName "CN=contoso.com" -IssuerName "Self" -ValidityInMonths 6 -ReuseKeyOnRenewal
Add-AzKeyVaultCertificate -VaultName "keyvaultname" -Name "joycer" -CertificatePolicy $Policy
For Azure CLI, this command az keyvault certificate create
should also work.
az keyvault certificate create --name
--policy
--vault-name
[--disabled {false, true}]
[--subscription]
[--tags]
[--validity]
Upvotes: 2