How can I search multiple required VM names in virtual machines tab in Azure portal.

Chetan Javir 25 Reputation points
2023-09-27T06:39:05.91+00:00

Hello,

I was going through searching of multiple only required VMs status in azure portal. For short information such as subscription name, VM name, resource group, status of VM can be found in virtual machines tab in azure portal. I want to search status of only required VMs through the azure portal. So, I can export it to CSV as well. Can anyone help me out.

Thanks in advance.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
0 comments No comments
{count} vote

Answer accepted by question author
  1. Olga Os - MSFT 5,961 Reputation points Microsoft Employee
    2023-09-29T19:30:34.37+00:00

    Hello Chetan Javir,

    Welcome to the MS Q&A Forum.

    Under the Virtual Machines overview page you could add additional columns to your output table:

    User's image

    or use the "filters" to specify the VM Status or any other property:

    User's image

    Hope above answers your question and concern. Let me know if you need additional assistance. If the answer was helpful, please accept it and complete the quality survey so that others can find a solution.

    Sincerely,
    Olga Os.


1 additional answer

Sort by: Most helpful
  1. anza 856 Reputation points
    2023-09-27T15:19:30.5266667+00:00

    what do you mean by 'required VMs'

    do you mean 'running VMs'

    here is a way to get running vms

    Connect-AzAccount

    $VmAll = Get-AzVM -Status

    $VmRunning = $VmAll | Where-Object {$_.PowerState -eq 'VM Running'}

    $VmRunning | Select-Object Name, ResourceGroupName, Location, PowerState | Sort-Object Name | Export-Csv VM.csv -NoTypeInformation

    test and adjust according to your wishes

    regards


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.