Skip to content

Instantly share code, notes, and snippets.

Avatar

Patrick Terlisten PatrickTerlisten

View GitHub Profile
@PatrickTerlisten
PatrickTerlisten / Get-LunPathState.ps1
Last active Jan 5, 2020
PowerCLI Script that outputs a list of all LUN paths for all ESXi hosts
View Get-LunPathState.ps1
#requires -Version 2
#requires -PSSnapin VMware.VimAutomation.Core
function Get-LUNPathState {
<#
.SYNOPSIS
No parameters needed. Just execute the script.
.DESCRIPTION
This script outputs the number of paths to each LUN.
@PatrickTerlisten
PatrickTerlisten / netscaler-config-script-exchange-2013-2016.txt
Last active Dec 4, 2019
Citrix NetScaler config for Exchange 2013/ 2016 with a single namespace
View netscaler-config-script-exchange-2013-2016.txt
# Replace srv_exchange with the desired server name and ip address
# Add one server object for each of your Exchange servers
add server srv_exchange1 x.x.x.x
add server srv_exchange2 x.x.x.y
# Replace x.x.x.x with the desired IP address
add cs vserver cs_vsrv_exchange SSL x.x.x.x 443 -cltTimeout 180 -caseSensitive OFF
add lb vserver lb_vsrv_exchange_owa SSL 0.0.0.0 0 -persistenceType NONE -cltTimeout 180
add lb vserver lb_vsrv_exchange_ecp SSL 0.0.0.0 0 -persistenceType NONE -cltTimeout 180
add lb vserver lb_vsrv_exchange_ews SSL 0.0.0.0 0 -persistenceType NONE -cltTimeout 180
View Export-Mailbox.ps1
# Liste aller Mailboxen
$Mailboxes = Get-Mailbox -OrganizationalUnit "OU=lamadrama,DC=domain,DC=local" | Sort-Object -Property Alias
# Liste der fehlgeschlagenen Mailboxen
$FailedMailboxes = @()
# Begrenzt die Anzahl der zu verarbeitenden Mailboxen
# $Mailboxes = $Mailboxes[0..4]
# Hier passiert die Magie...
@PatrickTerlisten
PatrickTerlisten / Get-CpuRatio
Last active May 8, 2018
This script outputs the pCPU/ vCPU ratio for each ESXi host.
View Get-CpuRatio
#requires -Version 1
#requires -PSSnapin VMware.VimAutomation.Core
function Get-CpuRatio {
<#
.SYNOPSIS
No parameters needed. Just execute the script.
.DESCRIPTION
@PatrickTerlisten
PatrickTerlisten / Reclaim-ThinVMDK.ps1
Last active Feb 21, 2018
This script uses sdelete to zero-out all disks of a Windows VM. Afterwards, the VM is moved between datastores to reclaim zeroed space.
View Reclaim-ThinVMDK.ps1
<#
.SYNOPSIS
No parameters needed. Just execute the script.
.DESCRIPTION
This script uses sdelete to zero-out all disks of a Windows VM. Afterwards, the VM
is moved between datastores to reclaim zeroed space.
History
v1.3: Redesign.
View install-docker-mintlinux182.sh
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates -y
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main'
sudo apt-get update
sudo apt-get purge lxc-docker
sudo apt-get install linux-image-extra-$(uname -r) -y
sudo apt-get install docker-engine cgroup-lite apparmor -y
sudo usermod -a -G docker $USER
sudo service docker start
@PatrickTerlisten
PatrickTerlisten / GetTemperatureSensorData.py
Last active May 10, 2017
Monitoring hardware status with Python and vSphere API calls
View GetTemperatureSensorData.py
from pyVim.connect import SmartConnect, Disconnect
import ssl
s = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
s.verify_mode = ssl.CERT_NONE
try:
c = SmartConnect(host='vcenter.lab.local', user='root', pwd='Passw0rd')
print('Valid certificate\n')
except:
@PatrickTerlisten
PatrickTerlisten / Fix-iovDisableIRSetting.ps1
Created Apr 5, 2017
This script checks if the iovDisableIR setting is set to FALSE. If not, it will set iovDisableIR to FALSE.
View Fix-iovDisableIRSetting.ps1
<#
.SYNOPSIS
This script checks if the iovDisableIR setting is set to FALSE. If not, it will set iovDisableIR to FALSE.
.DESCRIPTION
The script checks the current setting of the Intel IOMMU interrupt remapper (iovDisableIR) and changes the setting
if necessary.
The script needs a single parameter:
@PatrickTerlisten
PatrickTerlisten / Get-iovDisableIRSetting.ps1
Last active Apr 4, 2017
This script checks if the iovDisableIR setting is set to FALSE.
View Get-iovDisableIRSetting.ps1
<#
.SYNOPSIS
This script checks if the iovDisableIR setting is set to FALSE.
.DESCRIPTION
The script checks the current setting of the Intel IOMMU interrupt remapper (iovDisableIR).
The script needs a single parameter:
- vSphere Cluster
@PatrickTerlisten
PatrickTerlisten / Get-iovDisableIRSetting.ps1
Last active Mar 19, 2017
This script checks if the iovDisableIR setting is set to FALSE.
View Get-iovDisableIRSetting.ps1
<#
.SYNOPSIS
This script checks if the iovDisableIR setting is set to FALSE.
.DESCRIPTION
The script checks the current setting of the Intel IOMMU interrupt remapper (iovDisableIR).
The script needs a single parameter:
- vSphere Cluster
You can’t perform that action at this time.