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
// IMPORTANT: This needs to be your vRA host. In my case it happened to the third server configured. | |
// there is probably a better way to handle this. | |
var vraHost = Server.findAllForType("vCACCAFE:VCACHost")[3]; | |
// save the catalogRequestId from the payload given by vRA | |
var requestId = payload.get("catalogRequestId"); | |
// create a REST client on the selected vRA host, which we can use to do API calls against | |
var client = vraHost.createCatalogClient(); | |
// get the resources (read: VMs) that are a part of the catalogRequestId |
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
# This snippet gets all the IP routes | |
# | |
# Import-Module PowerNSX and run | |
# Connect-NsxServer before running this. | |
$edges = Get-NsxEdge | |
foreach($edge in $edges) | |
{ | |
Write-Host "Getting routes for Edge $($edge.name) ($($edge.id))" |
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
function New-NsxMulticastRange | |
{ | |
<# | |
.SYNOPSIS | |
Adds a new multicast IP address range for use in the VXLAN network | |
.DESCRIPTION | |
Specifying a multicast address range helps in spreading traffic across your | |
network to avoid overloading a single multicast address.A virtualized | |
network‐ready host is assigned an IP address from this range. |
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
param ( | |
[parameter(Mandatory=$true,ValueFromPipeLine=$true,ValueFromPipeLineByPropertyName=$true)] | |
[ValidateNotNullOrEmpty()] | |
[string]$username, | |
[parameter(Mandatory=$true,ValueFromPipeLine=$true,ValueFromPipeLineByPropertyName=$true)] | |
[ValidateNotNullOrEmpty()] | |
[string]$password, | |
[parameter(Mandatory=$true,ValueFromPipeLine=$true,ValueFromPipeLineByPropertyName=$true)] | |
[ValidateNotNullOrEmpty()] | |
[string]$apic, |
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
# This is where we save the cookies! | |
$global:CookieJar = New-Object System.Net.CookieContainer | |
$global:LoggedIn = $False | |
$global:LoggingIn = $False | |
function ACI-API-Call([string]$method, [string]$encoding, [string]$url, $headers, [string]$postData) | |
{ | |
$return_value = New-Object PsObject -Property @{httpCode = ""; httpResponse = ""} | |
## Create the request |
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
"/2.0/vdn/config/segments": { | |
"get": { | |
"description": "Lists all Segment ID Pools", | |
"tags": [ | |
"2.0" | |
], | |
"operationId": "Get_vdnSegmentPoolList_", | |
"produces": [ | |
"application/json" | |
], |
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
#!/usr/bin/perl | |
# Check Gluster volume status and number of present bricks | |
# | |
# Requires edits to /etc/sudoers: | |
# Defaults:epops !requiretty | |
# epops ALL=NOPASSWD: /usr/sbin/gluster volume info* | |
use strict; | |
use Getopt::Long qw(GetOptions); |
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
$Url = "http://www.example.com/path" | |
$Username="user" | |
$Password="password" | |
# Invoke Internet Explorer | |
$IE = New-Object -com internetexplorer.application; | |
$IE.visible = $true; | |
$IE.navigate($Url); | |
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
### Keybase proof | |
I hereby claim: | |
* I am smitmartijn on github. | |
* I am smitmartijn (https://keybase.io/smitmartijn) on keybase. | |
* I have a public key whose fingerprint is 4C42 8050 45A7 E181 5E7F F60A C95A 62E2 AC44 3AA2 | |
To claim this, I am signing this object: |
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
# This script goes through all backup jobs configured on your Veeam | |
# Backup & Replication Management server and calculates the amount of | |
# data (the size of the data in the VMs) and the backup sizes (the size | |
# of the data on the backup disk). | |
# | |
# There is more information in the backup job object for you to use, but this | |
# script was intended for billing purposes based on GB of backup storage. | |
# | |
# Martijn Smit <[email protected]> | |
# |