Skip to content

Instantly share code, notes, and snippets.

@chelnak
Created July 25, 2016 14:46
Show Gist options
  • Select an option

  • Save chelnak/3be671c7ee41dc4af954b5a84cf350b8 to your computer and use it in GitHub Desktop.

Select an option

Save chelnak/3be671c7ee41dc4af954b5a84cf350b8 to your computer and use it in GitHub Desktop.
Get all machines in a reservation with PowervRA
$ReservationName = "Reservation1"
$CatalogResources = Get-vRAConsumerResource -WithExtendedData | ? {($_.ResourceType -eq "Infrastructure.Virtual") -and ($_.Data.MachineReservationName -eq $ReservationName)}
$CatalogResources | Select ResourceId, Name, @{Name="Reservation"; Expression={$_.Data.MachineReservationName}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment