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
System.log("Updating VirtualMachineName to '" + inVM + "'."); | |
//Get the properties of the vRA VM Entity object | |
var vmEntityProps = inVMEntity.getProperties(); | |
//Change the VirtualMachineName property by deleting it and re-adding it | |
vmEntityProps.remove('VirtualMachineName'); | |
vmEntityProps.put('VirtualMachineName', inVM); | |
//Update the Entity object to save the change |
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
// Retrieve the virtual machine properties | |
var machine = payload.get("machine"); | |
// Check the machine's properties exist | |
if (machine !== null) { | |
// Retrieve the values | |
var attVirtualMachineId = machine.get("id"); | |
} | |
// Get the hostname generated by vRA |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<CustomDataType> | |
<Data Name="Utrecht" Description="Utrecht, NL"/> | |
<Data Name="Southport" Description="Southport, UK"/> | |
</CustomDataType> |
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
var category = Server.getConfigurationElementCategoryWithPath(inConfigurationElementPath); | |
var elements = category.configurationElements; | |
for each ( var element in elements) { | |
if (element.name == inConfigurationElementName) { | |
var configurationElement = element; | |
} | |
} | |
var result = (configurationElement.getAttributeWithKey(inName).value); |
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
var category = Server.getConfigurationElementCategoryWithPath(inConfigurationElementPath); | |
var elements = category.configurationElements; | |
for each ( var element in elements) { | |
if (element.name == inConfigurationElementName) { | |
var configurationElement = element; | |
} | |
} | |
configurationElement.setAttributeWithKey(inName, inValue); |
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
# Install the certificate | |
certutil -f -p $certPass -ImportPfx $cert | |
# Retrieve the certificate details | |
Set-Location -Path cert:\LocalMachine\My | |
$myCert = Get-ChildItem | Where-Object { $_.Subject -match "\*.hobbitcloud.com" } | |
# Configure friendly name for Horizon | |
$tp = $myCert.Thumbprint | |
(Get-ChildItem -Path Cert:\LocalMachine\My\$tp).FriendlyName = "vdm" |
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 | |
Uploads freshly minted certs to Horizon UAG | |
.DESCRIPTION | |
Generates an SSL certificate from Let's Encrypt, then connects to each UAG using the REST API and applies the certificate to the Internet interface. The Admin interface (port 9443) is unaffected. | |
.PARAMETER dnsName | |
The public DNS name of the UAG |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"route53:ListHostedZones", | |
"route53:GetChange" | |
], | |
"Resource": [ |
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
$ErrorActionPreference = "Stop" | |
$url = "https://download.sysinternals.com/files" | |
$zip = "SDelete.zip" | |
$exe = "sdelete64.exe" | |
$arg = "-z c: /accepteula" | |
# Get SDelete | |
Invoke-WebRequest -Uri ($url + "/" + $zip) -OutFile C:\$zip |
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
$ErrorActionPreference = "Stop" | |
$webserver = "webserver.contoso.local" | |
$url = "http://" + $webserver | |
$files = @("VMwareOSOptimizationTool.exe","VMwareOSOptimizationTool.exe.config","my_osot.xml") | |
$exe = $files[0] | |
$arg = "-o -t " + $files[2] | |
# Verify connectivity | |
if (Test-Connection $webserver -Quiet){ |