Question

Introduce the Problem

I like to manage Windows Azure Websites through PowerShell. For instance, I like to run Get-Website to view a list of all my websites. Before I do that, I need to authenticate with Windows Azure.

Research

One way to do this is via Add-AzureAccount, which prompts me to sign in with my Azure username and password, afterwhich I can run Get-AzureWebsite to view the list. At this point, I have no Management Certificates, and it doesn't seem to matter. I can run Remove-AzureAccount some@account.com to sign out.

enter image description here

Another way to do this is via a Management Certificate. I run Get-AzurePublishSettingsFile followed by Import-AzurePublishSettingsFile. Then I can run Get-AzureWebsite to view my list.

This seems like two ways to do the same thing.

Question

Other than allowing me to save a Management Certificate for convenience, what is the difference, if any, between the two methods?

Was it helpful?

Solution

Import-AzurePublishSettingsFile is not interactive, so I can use a batch process.

Add-AzureAccount is interactive. Since I do not require the certificate, I use Add-AzureAccount because it is easier.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top