Elsewhere I’ve referenced Keith Mayer. As I needed to remind myself how I did a backup, I started out with “his” suggested first command…
However… that gave me this one:
Get-AzureVM : No current subscription has been designated. Use Select-AzureSubscription -Current <subscriptionName> to
set the current subscription.
So try that, although at first I have no idea of my subscription…
Mystery solved, I think: in fact when you go into PowerShell for Azure, the first thing you need to do is not any of the Subscription-sounding functions, but this, i.e. enter
, that takes you to a credentials dialogue. Once you OK that, it confirms all your details:
But Get-AzureVM still didn’t work… well it didn’t find it, more accurately. So I downloaded it (Azure for PowerShell), and this time it was found. The old blog page gave me the rest of it, more or less.. Here’s where I am now, finishing for the night:
This, in fact is a useful piece:
I see that the error message has been made more helpful when your credentials have expired when entering [Get-AzureVM], in that it actually tells you what to do now:
Get-AzureVM : Your Azure credentials have not been set up or have expired, please run Add-AzureAccount to set up your Azure credentials.
Now run Get-AzureVM again, and they changed the formatting a bit as well:
So in summary, after you’ve been away a while, the 2 commands to get to a point where you list your VMs are: