0
votes

All,

I am trying to use a certificate to authenticate against azure instead of using the Azure-AddAccount. So I did the following in an administrator powershell console, i followed the instruction located at http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/ :

Get-AzurePublishSettingsFile This prompted me to login and download the publishsettings file. I placed the file in the same folder as the powershell console is.

Import-AzurePublishSettingsFile "D:\Dev\Powershell\azure.publishsettings" This command doesn't return anything. I am not sure if it worked, but if I put an invalid name it blows up so I assume it works.

Get-AzureStorageAccount I get the error "Get-AzureStorageAccount : Your credentials have expired. Please use Add-AzureAccount to log in again." At this point I thought I imported my certificate and this should work, but it doesn't. Am I missing a step? I have multiple subscriptions, maybe thats the problem?

1

1 Answers

1
votes

You still need to use Add-Account in addition to importing the publish settings file. Add-Account will prompt you for the user you wish to authenicate with when running certain commands.

Add-Account utilises a different authentication mechanism to the cert-based setup with the PublishSettings File and it necessary to use both in certain scenarios (such as yours).