Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get-AzureVM Returns Nothing

I am using Version 1.0.1 Azure PowerShell module and it seems there is some breaking changes I cannot figure out.

I have logged into Azure and the Get-AzureSubscription cmdlet returns my two accounts. However, executing Get-AzureVM's returns nothing even though the Azure Portal is properly reporting about a dozen.

What am I doing wrong?

Thanks

like image 571
ChiliYago Avatar asked Nov 30 '15 22:11

ChiliYago


People also ask

How do I get Azure VM tag in PowerShell?

Use the Get-AzVM cmdlet to view the current list of tags for your VM. If your Virtual Machine already contains tags, you will then see all the tags in list format. To add tags, use the Set-AzResource command. When updating tags through PowerShell, tags are updated as a whole.

How do I get my Azure VM credentials?

Option 1: Using the Azure PortalGo to Virtual Machines services on your Azure portal. Select the Virtual Machine that you want to find the username. On the Virtual Machine property page, from the option tree, click on the Run command option from the Operations section.


1 Answers

Run Add-AzureAccount; this will load the Azure login dialogue, allowing you to sign in.

Once done, running Get-AzureSubscription should work as you'd expect.

Sadly no helpful error's displayed to say "you're not logged in; run Add-AzureAccount to login" if the command's run without you being logged in.

like image 60
JohnLBevan Avatar answered Sep 23 '22 04:09

JohnLBevan