Skip to content

Instantly share code, notes, and snippets.

@chelnak
Last active July 3, 2016 18:36
Show Gist options
  • Select an option

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

Select an option

Save chelnak/f6823a32a9789a084e006d5bbb367d32 to your computer and use it in GitHub Desktop.
PowervRA - Populate custom properties Request-vRAConsumerCatalogItem
# --- Convert the JSON string to an object
$Object = (Get-vRAConsumerCatalogItemRequestTemplate -Name "A Catalog Item" | ConvertFrom-JSON)
# ---Build the request
$RequestProperties = $Object.data.VM.data
$RequestProperties.Hostname = "MyHostname"
$RequestProperties.cpu = 2
$RequestProperties.memory = 2048
# ---- Submit the request
($Object | ConvertTo-Json -Depth 100) | Request-vRAConsumerCatalogItem -Wait -Confirm:$false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment