May 30th, 2016

PowerTip: Show Azure Resource Manager virtual machine status with PowerShell

Doctor Scripto
Scripter

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

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.