Dump Azure ARM VMs to CSV

Looks up details of any Azure Resource Manager (ARM) Virtual Machines across whatever subscriptions you have access to, and writes them to a .CSV file. This allows you to easily analyse the details in Excel, for example to show charts or Pivot Tables listing VMs by size, status,

5 Star
9,524 times
Add to favorites
Windows Azure
E-mail Twitter del.icio.us Digg Facebook
  • Subscription column is empty
    1 Posts | Last post March 04, 2020
    • Hi Tom,
      Thanks a lot for such a amazing script. it really helps
      But for each vm subscription info is blank in csv file
      i just tried by changing following, still it did not work
      changed to 'Subscription'=$sub.Name
      Please let me know how to fix it
  • getting error while running this script
    2 Posts | Last post February 13, 2020
    • Hi Guys,
      I'm getting below error while running this script, kindly advise me to resolve this?
      Get-AzureRmVM : Parameter set cannot be resolved using the specified named parameters.
      At C:\Users\adminuser\Desktop\List VMs details.ps1:41 char:31
      +             $vmStatus = $vm | Get-AzureRmVM -Status
      +                               ~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : InvalidArgument: (Microsoft.Azure...tualMachineList:PSObject) [Get-AzureRmVM], ParameterBindingExcepti 
          + FullyQualifiedErrorId : AmbiguousParameterSet,Microsoft.Azure.Commands.Compute.GetAzureVMCommand
    • What is the fix to this, i also got the same error.
  • Fix
    2 Posts | Last post November 12, 2019
    • You may have to use $sub.Name instead of $sub.SubscriptionName to write correct information about Name of each Subscription.
    • Thanks, its worked.
  • Corrections to the script
    1 Posts | Last post October 24, 2017
    • The two lines in the script referring to subscription name and ID needs to be updated as below:
      Write-Host Processing subscription $sub.name
      Select-AzureRmSubscription -SubscriptionId $sub.Id -ErrorAction Continue