chelnak
7/3/2016 - 6:35 PM

PowervRA - Populate custom properties Request-vRAConsumerCatalogItem

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