Answered by:
Azure PowerShell Certificate not found

Question
-
Hi, I somehow ended up with a lot of azure certificates, probably from messing around with it. So I decided to clean them up and remove them. So now when I try to use Azure PowerShell to do anything like: Get-AzureSubscription, I get the following:
"Get-AzureSubscription : No certificate was found in the certificate store with thumbprint XXXX...."
Even when I try to add a new certificate, remove the old one, anything. Any ideas how I can get PowerShell to recognize a new certificate?
- Tomek
Tuesday, July 3, 2012 12:49 AM
Answers
-
You should look at Michael Washam's excellent introduction to the new PowerShell cmdlets. He points out that the subscription information is stored at: C:\Users\user\AppData\Roaming\Windows Azure Powershell
You may be able to fix the problem by directly editing that file, or by following Michael's instructions for adding a subscription.
- Marked as answer by Tomaszewski Tuesday, July 3, 2012 1:47 AM
Tuesday, July 3, 2012 1:41 AMAnswerer
All replies
-
You should look at Michael Washam's excellent introduction to the new PowerShell cmdlets. He points out that the subscription information is stored at: C:\Users\user\AppData\Roaming\Windows Azure Powershell
You may be able to fix the problem by directly editing that file, or by following Michael's instructions for adding a subscription.
- Marked as answer by Tomaszewski Tuesday, July 3, 2012 1:47 AM
Tuesday, July 3, 2012 1:41 AMAnswerer -
You should look at Michael Washam's excellent introduction to the new PowerShell cmdlets. He points out that the subscription information is stored at: C:\Users\user\AppData\Roaming\Windows Azure Powershell
You may be able to fix the problem by directly editing that file, or by following Michael's instructions for adding a subscription.
my friend, I have no clue how I missed this. I looked in roaming and Local and LocalLow... i even scanned the registrty. In fact, Roaming was the first place I looked and saw nothing that said Azure. Now I looked again, and sure enough: "Windows Azure Powershell"! Thank you so much!
For short, if it helps anyone, I:
- Removed (moved to elsewhere) all of the files in "C:\Users\user\AppData\Roaming\Windows Azure Powershell"
- Ran: Get-AzurePublishSettingsFile which allowed me to download the new file
- Ran: Import-AzurePublishSettingsFile -PublishSettingsFile theSettingsFile.publishsettings
Thanks again Neil!
- Tomek
Tuesday, July 3, 2012 2:19 AM -
hi,
the two steps are completly right.
- Run: Get-AzurePublishSettingsFile which allowed me to download the new file
- Run: Import-AzurePublishSettingsFile -PublishSettingsFile theSettingsFile.publishsettings
what happens under the hood? the publishingSettingsFile include a certificate, you have downloaded it with Get-AzurePublishSettingsFile. All your powershell cmdlet work with Client based certificate to do the authentication stuff to your Azure Subscription. You can use the cert.msc to check you personal certificate store. You see one certificate with the same "windows Azure tools".... in the past i clean up my certificate store and after this i had the same issue like you...
More Details you can find here
regards
patrick
Monday, July 16, 2012 12:06 PM -
Simple,
Just delete all the files from C:\Users\[User]\AppData\Roaming\Windows Azure Powershell,
Then execute the commands in the following order
PS C:\> Get-AzurePublishSettingsFile
PS C:\> Import-AzurePublishSettingsFile 'C:\Users\[User]\AppData\Roaming\Windows Azure Powershell\[FileName].publishsettings'After the execution of the above command, you should be able to execute all the Windows Azure PowerShell Commands
Friday, July 12, 2013 7:38 AM