Skip to content

Instantly share code, notes, and snippets.

Created September 17, 2017 10:28
What would you like to do?
### Log into Azure
$Subscription = (Get-AzureRmSubscription | Out-GridView -Title "Choose a Source & Target Subscription ..." -PassThru)
Select-AzureRmSubscription -SubscriptionId $Subscription.Id
# Upload Certificate to Azure's Key Vault
$securepfxpwd = ConvertTo-SecureString –String 'password' –AsPlainText –Force # Password for the private key PFX certificate
$certificateName = 'My-Cert'
$vaultName = 'MyVault'
$cer = Import-AzureKeyVaultCertificate -VaultName $vaultName -Name $certificateName -FilePath 'C:\My-Cert.pfx' -Password $securepfxpwd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment