VM Reporting Script for Nutanix AHV with Powershell

PowershellAs I was on a roll with powershell scripts anyway I looked at the Reporting vGPU enabled VMs on AHV.I wrote earlier this month and wanted to reuse that script for the VM Inventory script I had written back in 2017 and with the new capabilities of Nutanix AHV it made sense to add the vGPU profiles to this script.

From that older blog, the following interfaces are available:

  • Scripting interfaces (PowerShell)

The following definitions are from the Nutanix Bible as Steve Poitras already explained this:

The REST API exposes every capability and data point of the Prism UI and allows for orchestration or automation tools to easily drive Nutanix action.  This enables tools like Saltstack, Puppet, vRealize Operations, System Center Orchestrator, Ansible, etc. to easily create custom workflows for Nutanix. Also, this means that any third-party developer could create their own custom UI and pull in Nutanix data via REST.

HTML5 GUI (Prism UI)
The HTML5 UI is a key part to Prism to provide a simple, easy to use management interface.  However, another core ability are the APIs which are available for automation.  All functionality exposed through the Prism UI is also exposed through a full set of REST APIs to allow for the ability to programmatically interface with the Nutanix platform.  This allow customers and partners to enable automation, 3rd-party tools, or even create their own UI.

The Acropolis CLI (ACLI) is the CLI for managing the Acropolis portion of the Nutanix product.  These capabilities were enabled in releases after 4.1.2. The Nutanix CLI is the CLI for managing the Nutanix product and is more heterogeneous across hypervisors.

Windows PowerShell is a powerful shell (hence the name ;P) and scripting language built on the .NET framework.  It is a very simple to use language and is built to be intuitive and interactive.
Running the script
The actual output (CSV file)
The following two tabs change content below.

Kees Baggerman

Kees Baggerman is a Staff Solutions Architect for End User Computing at Nutanix. Kees has driven numerous Microsoft and Citrix, and RES infrastructures functional/technical designs, migrations, implementations engagements over the years.


  1. […] that older blog, the following interfaces are […]

  2. […] to Out-GridView #PowerShell https://buff.ly/2UBPq6x “. This made me modify the current VM Reporting script for AHV and now the script will output to this HTML view when the PSWriteHTML module is installed and […]

  3. Manoj Mone says:

    Great Script! I have made a couple of additions to this. I have changed the code so that the VMdetails call to be run even when no GPU is present. This is to retrieve Cluster UUID and CPU details. Also added VM uuid. The CSV filename now uses timestamp. The updated code can be found here – https://github.com/manoj-mone/ITSM/blob/main/Nutanix_Inventory_Script_v4.ps1

    • Markus Nitsche says:

      Hey, how i can i run the script in Powershell 7.x ?
      Powershell 5.x does not supportet from the script.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.