Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remote name could not be resolved for Azure Key Vault

I have successfully created an Azure Key Vault, but I cannot add any secrets to it. I am following the instructions (https://azure.microsoft.com/en-gb/documentation/articles/key-vault-get-started/), but when I try

$secretvalue = ConvertTo-SecureString 'Pa$$w0rd' -AsPlainText -Force
$secret = Set-AzureKeyVaultSecret -VaultName 'ContosoKeyVault' -Name 'SQLPassword' -SecretValue $secretvalue

I am getting this exception:

Set-AzureKeyVaultSecret : The remote name could not be resolved: 'mykeyvault.vault.azure.net'.

Any ideas what the problem could be?

like image 893
Dan O'Leary Avatar asked Apr 28 '16 16:04

Dan O'Leary


People also ask

How do I rename a key vault in Azure?

No, vaults cannot be renamed. You can however move contents from one vault to another (via backup and restore). Do click on "Mark as Answer" on the post that helps you and vote it as helpful, this can be beneficial to other community members.

Can Azure key vault generate keys?

Add a key to Key VaultOn the Key Vault properties pages, select Keys. Click on Generate/Import. On the Create a key screen choose the following values: Options: Generate.


2 Answers

This fixed it for me:

ipconfig /flushdns

taken from issue here:

https://github.com/Azure/azure-powershell/issues/1524

like image 113
johnstaveley Avatar answered Sep 28 '22 04:09

johnstaveley


I suspect it might be related to your internet connection, proxies, some settings on your machine, etc... Switching wifi network fixed my error message.

like image 38
Boris Lipschitz Avatar answered Sep 28 '22 04:09

Boris Lipschitz