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

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

  • Comments 3
  • Likes

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.

http://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:\Users\aviraj\AppData\Roaming\Windows 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>\AppData\Roaming\Windows Azure Powershell

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

image

Enjoy!!

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • FYI, I found that this would not work until PowerShell was closed and re-opened.

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

  • 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.