This file contains 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
Get-vRABusinessGroup | Select Name, @{Name="GroupManagers"; Expression={$_.GroupManagerRole.Name}}, @{Name="SupportUsers"; Expression={$_.SupportUserRole.name}}, @{Name="BuisinessUsers"; Expression={$_.UserRole.name}} |
This file contains 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
Get-vRAConsumerResource -WithExtendedData | ? {$_.ResourceType -eq "Infrastructure.Virtual"} | Select ResourceId, Name, @{Name="Reservation"; Expression={$_.Data.MachineReservationName}} | Sort-Object -Property Reservation, Name |
This file contains 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
$ReservationName = "Reservation1" | |
$CatalogResources = Get-vRAConsumerResource -WithExtendedData | ? {($_.ResourceType -eq "Infrastructure.Virtual") -and ($_.Data.MachineReservationName -eq $ReservationName)} | |
$CatalogResources | Select ResourceId, Name, @{Name="Reservation"; Expression={$_.Data.MachineReservationName}} |
This file contains 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
(Get-Content .\code\vRO\CatalogItem1.json -raw) | Request-vRAConsumerCatalogItem -Verbose -Wait |
This file contains 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
while($true) {(Get-vRAConsumerRequest -RequestNumber 2397).State; sleep 5} |
This file contains 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
Get-vRAConsumerCatalogItem | ? {$_.Name -like "*LIKE*"} | Select Id, Name | % {Get-vRAConsumerCatalogItemRequestTemplate -Id $_.Id | Out-File -FilePath ".\Data\$($_.Name).json"} |
This file contains 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
//Get the first datastore in the array | |
var dataStores = vcVirtualMachine.datastore; | |
var dataStore = dataStores[0].name; | |
System.log("Found first datastore in array: " + dataStore); | |
//Get datastore prefix |
This file contains 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 |
This file contains 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
<# | |
Example script to demonstrate how to submit multiple vRA catalog item requests | |
from a predefined list. | |
The example submits each request as a seperate PSJob. The status of each job can be | |
monitored via the vRA web console and by using Get-Job. | |
#> |
This file contains 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
# --- Create a vCloud Air Reservation | |
# --- Get the compute resource id | |
$ComputeResource = Get-vRAReservationComputeResource -Type "vCloud Air" -Name "uk-slough-1-6 - VDC1 (vCloud Air)" | |
# --- Get the network definition | |
$NetworkDefinitionArray = @() | |
$Network1 = New-vRAReservationNetworkDefinition -Type "vCloud Air" -ComputeResourceId $ComputeResource.Id -NetworkPath "isolated-network" | |
$NetworkDefinitionArray += $Network1 |