Public/Get-MultiHypervisorVm.ps1

<#
    .DESCRIPTION
    Wrapper for Nutanix API version 0.3.
 
    .NOTES
    Author: Timothy Rasiah
#>


function Get-MultiHypervisorVm {
    [CmdletBinding()]
    param (
        $uuid
    )

    $data = @{
        "kind" = "mh_vm"
    }

    if (-not $uuid) {
        $response = Send-Request -method "POST" -endpoint "/mh_vms/list" -data $data
        return $response.entities
    }

    $response = Send-Request -method "GET" -endpoint "/mh_vms/$($uuid)"
    return $response
}