For some reason I do not get any information when I run Get-AzureVM
or Get-AzureRmVm
.
I used the following to login: Login-AzureRMAccount
. I can see all of my subscriptions by doing Get-AzureSubscription | select SubscriptionName
.
I am running latest version of Azure Powershell. I used Resource Manager to build my virtual machines a couple of days ago.
If you have multiple Azure subscriptions under your Azure account, you will first need to select the right subscription where your Azure Resource Manager (RM) VM resides by the following command.
Set-AzureRmContext -SubscriptionId <your-subscriptionId> -TenantId <your-tenantId>
You could see your list of subscription Ids and tenant Ids by:
Get-AzureRmSubscription
After you set the right Azure Rm Context, you should be able to get all Azure RM VM under the current subscription context by:
Get-AzureRmVM
This solution has been tested on my Azure subscription and VM using the latest Azure PowerShell December 2015 (1.0.2).
Hope this helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With