PowerTip: Show Azure Resource Manager virtual machine status with PowerShell


Summary: Using the Azure Resource Manager cmdlets to see the running state of a virtual machine.

Hey, Scripting Guy! Question I remember using the old cmdlets for Azure, and they would show the status of my virtual machines.  How can I do that with the new cmdlets?

Hey, Scripting Guy! Answer Use the Get-AzureRM cmdlet with the –Status parameter to expand the available properties. Here’s a simple example to pull the statuses of a virtual machine: Here is an example:

Get-AzureRMVM –Name HSG-Linux1 –ResourceGroupName HSG-AzureRG –Status | Select-Object –expandproperties Statuses

The Doctor

Comments (0)

Skip to main content