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
const model = "ManagementModelEntities.svc"; | |
const entitySet = "PropertyDefinitions"; | |
// Create a filter, looking for a PropertyName matching our propertyName input string | |
var customFilterProperties = new Properties(); | |
customFilterProperties.put("PropertyName",propertyName); | |
// Find all PropertyDefinition entities matching the filter | |
var propertyDefinitions = vCACEntityManager.readModelEntitiesByCustomFilter( | |
vcacVcacHost.id, |
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 Get-IaaSVirtualMachine { | |
<# | |
.SYNOPSIS | |
Gets information about a virtual machine from vRA's IaaS oData interface. | |
.DESCRIPTION | |
Gets information about a virtual machine from vRA's IaaS oData interface. This includes the option to get data from linked tables. | |
Which includes custom properties | |
.PARAMETER Server |
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 jenkinsPollingIntervalMS = 1000; | |
var buildURL = ""; | |
var buildResult = null; | |
/* | |
Create the request object. The two paramaters are:- | |
- An array of values for the URL template paramaters. We have none, so this is null | |
- Any content for POST or PUT operations. Ours is a GET, so this is also nulll | |
*/ | |
var objRESTRequest = generateCatFact.createRequest(null,null); |
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-IaaSHostNamePrefix { | |
<# | |
.SYNOPSIS | |
Creates a new vRO naming prefix using the IaaS oData interface via REST | |
.DESCRIPTION | |
Creates a new vRO naming prefix using the IaaS oData interface via REST. Tested on vCO 6.2.1 with PowerShell 4 | |
.PARAMETER Server | |
The name of the IaaS server on which the operation shouldbe performed. |
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 Restart-VirginRouter { | |
<# | |
.Synopsis | |
Restarts a Virgin Media Suberhub. | |
.Description | |
Restarts a Virgin Media Suberhub using the web interface. | |
.Parameter RouterIP | |
The IP address of the router. |
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 | |
Converts a PowerShell object to a Markdown table. | |
.EXAMPLE | |
$data | ConvertTo-Markdown | |
.EXAMPLE | |
ConvertTo-Markdown($data) | |
#> | |
Function ConvertTo-Markdown { | |
[CmdletBinding()] |
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
# Test-Ping | |
## Synposis | |
Pings a server and returns TRUE or FALSE. | |
## Syntax | |
```PowerShell | |
\Test-Ping.ps1 [-computer] <String> [<CommonParameters>] | |
``` | |
## Description |
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 Sort-JSON { | |
param ( | |
[Parameter( | |
Mandatory = $true, | |
Position = 1 | |
)] | |
[ValidateScript({ | |
Test-Path $_ | |
})] | |
[string] |
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 GenerateScriptDocumentationInMarkdown { | |
<# | |
.Synopsis | |
Generates documentation for a folder-full of scripts using the integrated Get-Help CMDlets. | |
.Description | |
Generates a .markdown documentat for each PS1 script in a folder which has the necessary headers required by Get-Help. Also generates an index document which lists (and links to) all generated documentats. Each file name is preceeded with "script_ps1_" so that they are listed together when viewing the Wiki documents. | |
.Parameter SourceScriptFolder | |
Source folder where the scripts are located |
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
Connect-QADService -Service "YourConnectionServer" | |
$ObjVDICapacityData = Get-QADObject -IncludeAllProperties -SizeLimit 0 -SearchRoot "OU=Server Groups,DC=vdi,DC=vmware,DC=int" -Type "pae-ServerPool" | Select-Object Name,@{Name="DisplayName";Expression={$_."pae-DisplayName"}},@{Name="MinProvisioned";Expression={$_."pae-SVIRollingRefitMinReadyVM"}},@{Name="Spare";Expression={$_."pae-VmHeadroomCount"}},@{Name="MaxDesktops";Expression={$_."pae-VmMaximumCount"}},@{Name="MinDesktops";Expression={$_."pae-VmMinimumCount"}} | |
Disconnect-QADService | |
$ObjVDICapacityData | Format-Table -Auto |
NewerOlder