Powershell – What’s the difference between Get-AzureRmVM and Get-AzureVM

azurepowershell

I'm trying to set up a Load Balancer on Azure. I'm following this doc. At the end, you basically have to attach your virtual network adapter to a running VM. The docs refer to using Get-AzureRmVM to find the desired VM name in the desired resource group. However, though I can see various VMs running on the web portal, when I type:

Get-AzureRmVM

I don't get any results. However, if I type:

Get-AzureVM

I see all my virtual machines. The parameters are slightly different, but it seems similar.

My Question:

What is the difference between Get-AzureRmVM and Get-AzureVM? Why do all the docs say to use Get-AzureRmVM when it doesn't appear to work?

Best Answer

If you are using classic (v1) VMs, then you aren't using resource manager, and thus the RM-specific cmdlets will return nothing, as you are seeing.

Related Topic