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 Start-UNMAP { | |
<# | |
.SYNOPSIS | |
Process SCSI UNMAP on VMware Datastores | |
.DESCRIPTION | |
This Function will process SCSI UNMAP on VMware Datastores via ESXCLI -V2 | |
.Example | |
Start-UNMAP -ClusterName myCluster -DSWildcard *RAID5* |
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 Get-VMmaxIOPS { | |
<# | |
.NOTES | |
=========================================================================== | |
Created by: Markus Kraus | |
Twitter: @VMarkus_K | |
Private Blog: mycloudrevolution.com | |
=========================================================================== | |
Changelog: | |
2016.10 ver 1.0 Base Release |
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 Konfig-ESXi { | |
<# | |
.NOTES | |
=========================================================================== | |
Created by: Markus Kraus | |
Twitter: @VMarkus_K | |
Private Blog: mycloudrevolution.com | |
=========================================================================== | |
Changelog: | |
2016.12 ver 1.0 Base Release |
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-DNATRule ( | |
$EdgeGateway, | |
$ExternalNetwork, | |
$OriginalIP, | |
$OriginalPort, | |
$TranslatedIP, | |
$TranslatedPort, | |
$Protocol) { | |
$Edgeview = Search-Cloud -QueryType EdgeGateway -name $EdgeGateway | Get-CIView | |
if (!$Edgeview) { |
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-VeeamTenant { | |
<# | |
.SYNOPSIS | |
Creates a vCloud Tenant Configuguration for Veeam Backuo & Replication | |
.DESCRIPTION | |
Creates a vCloud tenent Configuration for Veeam Backup & Replication. | |
The Function leverages the Veeam Ent. Manager API. The Backup Jobs need to be created seperate | |
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
# Requires PowerShell 5.1 | |
# Requires .Net 4.5.2 and Reboot | |
#region: Variables | |
$source = "X:" | |
$licensefile = "C:\_install\veeam.lic" | |
$username = "svc_veeam" | |
$fulluser = $env:COMPUTERNAME+ "\" + $username | |
$password = "Password!" | |
$CatalogPath = "D:\VbrCatalog" |
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
// VMware vRealize Orchestrator action sample | |
// | |
// Removes duplicates from an array, with the option to also sort the array | |
// | |
// For vRO 6.0+ | |
// | |
// Action Inputs: | |
// a - Array/Any - Array with potential duplicates | |
// doSort - boolean - Sort the array also? Potentially better performance than unsorted algorithm | |
// |
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
#Credits: http://vman.ch/vrops-suite-api-properties-import/ | |
#region: SSL Config for SelfSigned Cert and force TLS 1.2 | |
add-type @" | |
using System.Net; | |
using System.Security.Cryptography.X509Certificates; | |
public class TrustAllCertsPolicy : ICertificatePolicy { | |
public bool CheckValidationResult( | |
ServicePoint srvPoint, X509Certificate certificate, | |
WebRequest request, int certificateProblem) { |
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
[String]$ClusterName = "Compute01" | |
[String]$LocalPath = "D:\Image\HPE-20180220.zip" | |
[String]$DepotName = "HPE-20180220.zip" | |
[String]$TempDatastoreName = "LOCAL*" | |
$VMhosts = Get-Cluster -Name $ClusterName | Get-VMHost | Where-Object {$_.ConnectionState -eq "Maintenance"} | |
foreach ($VMhost in $VMhosts) { | |
#region: Upload Patch | |
$Datastore = $VMhost | Get-Datastore -Name $TempDatastoreName |
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 Set-MyESXiOption { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$True, ValueFromPipeline=$False, Position=0)] | |
[String] $Name, | |
[Parameter(Mandatory=$False, ValueFromPipeline=$False, Position=1)] | |
[String] $Value | |
) | |
process { | |
$myESXiOption = Get-AdvancedSetting -Entity $VMhost -Name $Name |