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
#requires -version 5 | |
<# | |
- Export vRA Blueprint content package and extract the archive | |
- Requires PowerShell 5 | |
#> | |
# --- Set Filter |
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
function New-CosmosDBRESTAuthToken { | |
[CmdletBinding()] | |
Param( | |
[Parameter()] | |
[String]$Verb, | |
[Parameter()] | |
[String]$ResourceType, | |
[Parameter()] | |
[String]$ResourceId, | |
[Parameter()] |
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
$Body = @" | |
{ | |
"entries": [ | |
{ | |
"key": "name", | |
"value": { | |
"type": "string", | |
"value": "craig" | |
} | |
} |
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
$Body = @" | |
{ | |
"requestHeader": null, | |
"requestData": { | |
"entries": [ | |
{ | |
"key": "host", | |
"value": { | |
"type": "string", | |
"value": "b89d15b9-b954-4046-9d76-778edd791b99" |
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
$EscapedBusinessGroupName = [URI]::EscapeDataString($BusinessGroupName) | |
$URI = "/identity/api/tenants/$($TenantId)/subtenants?`$filter=name%20eq%20'$($EscapedBusinessGroupName)'" | |
$Response = Invoke-vRARestMethod -Method GET -URI $URI -Verbose:$VerbosePreference |
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
<# | |
.SYNOPSIS | |
Enables disk encrption on a VM | |
.DESCRIPTION | |
Enables disk encryption on a VM. The script will create a new Key Vault, Azure Active Directory Application and Service principal | |
.PARAMETER ResourceGroupName | |
The name of the resource group that contains the key vault and virtual machine |
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
/* | |
- Update IaaS Virtual Machine State | |
- Input: virtualMachineName [String] | |
*/ | |
var state = "Off"; | |
var vCACVirtualMachine = Server.findAllForType("vCAC:VirtualMachine", "VirtualMachineName eq '" + virtualMachineName + "'"); |
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
/* | |
- Update the vRO Workflow Associated with an XaaS Blueprint | |
- Input: vCACCAFEHost [vCACCAFE:vCACHost] | |
- Input: blueprintId [String] | |
- Input: workflowId [String] | |
*/ | |
var tenant = vCACCAFEHost.tenant; |
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
/* | |
- Reset the password of a local user principal | |
- Input: vCACCAFEHost [vCACCAFE:vCACHost] | |
- Input: principalId [String] | |
- Input: password [SecureString] | |
- Input: confirmPassword [SecureString] | |
- Output: [Void] | |
*/ |
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 |