Dan O'Leary
Dan O'Leary

Reputation: 2822

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?

Upvotes: 11

Views: 7592

Answers (2)

johnstaveley
johnstaveley

Reputation: 1499

This fixed it for me:

ipconfig /flushdns

taken from issue here:

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

Upvotes: 4

Boris Lipschitz
Boris Lipschitz

Reputation: 9516

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

Upvotes: 2

Related Questions