The one PowerShell slot you are looking for might look something like this:
Get-AzureRmVM -ResourceGroupName "MyRGName" -Name "MyVmName" -Status | `
    select -ExpandProperty Statuses | `
    ?{ $_.Code -match "PowerState" } | `
    select -ExpandProperty DisplayStatus
VM deallocated,  VM running, .
Get-AzureRmVm, :
Install-Package AzureRM
Install-AzureRM