Share via


Windows Azure PowerShell Error: Import-AzurePublishSettingsFile : No certificate was found in the certificate store with thumbprint

I have multiple Azure Subscriptions configured with my Microsoft Account (formerly Live ID) Some time back couple of subscriptions were disabled due to excessive usage, which is fine. However, at this time when I tried to manage the same using PowerShell I was getting the following error every time I tried to Import the Publish Settings file using Import-AzurePublishSettingsFile command.

I ran the following command

PS C:> Import-AzurePublishSettingsFile -PublishSettingsFile 'C:Final<SUBSCRIPTION_NAME>.publishsettings'

image

I did not understand what was the problem around the same as every time I use the same method & it works. But never I faced any issue. I checked on to the management portal just to verify if it has created proper certificates. Here is the output.

image

I then decided to search online to see what was the problem. I found a link that explains the same behavior.

https://social.technet.microsoft.com/Forums/en-US/windowsazuremanagement/thread/93750a76-9f87-4b00-ad4d-4908cf55c12d

Interestingly the answer suggested by Neil was appropriate. The subscription data was stored earlier in the following folder C:UsersavirajAppDataRoamingWindows Azure Powershell

image

And that was the problem as the data included my disabled subscription details as well, which are not available in my newly downloaded Publish Settings File.

 

SOLUTION

Just delete all the files in the folder C:Users<USER>AppDataRoamingWindows Azure Powershell

And try to re-run the same command Import-PublishSettingsFile & voila problem is solved Smile

image

Enjoy!!

Comments

  • Anonymous
    August 30, 2013
    FYI, I found that this would not work until PowerShell was closed and re-opened.

  • Anonymous
    December 06, 2013
    Thanks Aviraj :) It worked for me as well, like Robin after restarting powershell

  • Anonymous
    September 15, 2014
    Thanks for this, I removed a certificate from my machine and was then getting this error getting any Azure commands. I couldn't even list which certificates had been set or remove the old entries. Manually removed them from this config file worked.