Azure Show All Running Resources
In this repository All GitHub ↵ Jump to. No cmdlet to get VM status (running, etc) with ARM #1724. ItalyPaleAle opened this issue Jan 27, 2016 19 comments Comments. Another one-liner I use frequently to show me Resource Group, VM Name, and current status.
Track tasks and feature requests
Join 36 million developers who use GitHub issues to help identify, assign, and keep track of the features and bug fixes your projects need.
Sign up for free See pricing for teams and enterprisesHave a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
commented Jan 27, 2016
A customer of mine reported that Get-AzureRmVM does not include any field specifying whether the VM is running or not, as Get-AzureVM does. |
commented Jan 29, 2016
Agreed - this should definitely be more explicit. Current workaround is to use the For example:
|
commented Jan 29, 2016
Thank you @mjyeaney ! This will do it for now - though I agree it should be made more explicit. |
commented Feb 2, 2016
Azure Show All Running Resources Free
@EgoAleSum Behind these two results are two different APIs. |
commented May 21, 2016
One limitation of this approach is getting a list of your VMs together with their current status (running or not). It's a common scenario especially for people with many VMs. Unless I am missing something, they now need to do one API call for each VM which is time consuming especially compared to the single old ASM call Please consider allowing |
commented May 28, 2016
Ain't pretty, but you can do this: |
commented May 31, 2016
@neaorin@ned1313 We could explore calling both APIs (model and instance view) and display the most important VM properties + VM status for a vanilla |
commented Jun 1, 2016
The performance hit might be fine for some users (myself included) and not acceptable for others. In my view, if the performance hit is significant then it would be better to have the user opt-in by explicitly requesting instance information - for instance |
commented Jun 1, 2016
I'd like to see it scoped to a VM or ResourceGroup, so if you want to use the -Status switch it either requires a VM name or ResourceGroup name. |
commented Jun 28, 2016
Further more, the same command returns different objects depending on |
commented Sep 1, 2016 • edited
edited
Or you can do this way.. Get-AzureRmResource ?{$.ResourceType -eq 'Microsoft.Compute/virtualMachines'} foreach {get-azurermvm -ResourceGroupName $.ResourceGroupName -Name $.ResourceName |
commented Sep 23, 2016
I wish I could get the disk uris, as the instance view just display the names... |
commented Sep 23, 2016 • edited
edited
@ShabuddinKhan You're missing a We explored spitting out statuses on our end but quickly realized there is a chance users might hit the API throttling limits because you need to make an instance view API call for each VM in your subscription. Say if you have 5000 VMs in your subscription and you run the Get-AzureRmVm 3 or more times within an hour, you are very likely to hit the throttling limits. |
commented Oct 6, 2016
$ResourceGroupName='GSRG' Get-AzureRmVM -ResourceGroupName $ResourceGroupName |
commented Oct 6, 2016
Another one-liner I use frequently to show me Resource Group, VM Name, and current status: |
commented Feb 10, 2017
I think this will accomplish the same thing as above: |
commented Jul 7, 2017
@singhkays I do not understand why this issue was closed. At a minimum the powershell team could open a issue with the compute API team then track this once the ARM api is fixed. |
commented Jul 7, 2017
@erichexter It was closed because the OPs question was resolved. However, since then PowerShell now allows you to do |
commented Jul 9, 2018
@singhkays thankyou.. your response really helped me today :) |
referenced this issue Jul 23, 2018
OpenGet-AzureRMVM -Status yields different result when running against a single machine rather than a pool of machines #3896
commented Jan 19, 2019
It is painful to duplicate Get-AzureRmVm two times. It would be good to have it in the vm object |