Last active
July 3, 2016 18:36
-
-
Save chelnak/f6823a32a9789a084e006d5bbb367d32 to your computer and use it in GitHub Desktop.
PowervRA - Populate custom properties Request-vRAConsumerCatalogItem
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # --- 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