Skip to content

Instantly share code, notes, and snippets.


Markus Kraus vMarkusK

View GitHub Profile
vMarkusK / REST API service for Veeam backup & Replication.postman_collection.json
Created Nov 9, 2020
REST API service for Veeam backup & Replication Postman Collection
View REST API service for Veeam backup & Replication.postman_collection.json
This file has been truncated, but you can view the full file.
"info": {
"_postman_id": "3f100323-72de-47c0-a14a-ea11fcb692f4",
"name": "REST API service for Veeam backup & Replication",
"description": "REST API service for Veeam backup & Replication\n\nContact Support:\nEmail:",
"schema": ""
"item": [
vMarkusK /
Last active Oct 7, 2020
Prepate CentOS 8
hostname ansible01
dnf install -y epel-release
dnf upgrade -y
dnf install -y open-vm-tools python3 git
useradd ansible
su ansible
echo 'ansible ALL=(ALL) NOPASSWD:ALL' >> visudo
pip3 install --user ansible
vMarkusK / Get-ClusterSLO.ps1
Created Sep 7, 2020
This VMware PowerCLI Script gathers the current SLIs of the given vSphere Cluster. The values are only a snapshot of the current state, no statistics are processed (so far).
View Get-ClusterSLO.ps1
function Get-ClusterSLO {
Created by: Markus Kraus
Twitter: @VMarkus_K
Private Blog:
2020.08 ver 1.0 Base Release
vMarkusK / gpg.txt
Created Feb 26, 2020
GPG and GitHub
View gpg.txt
# Generate Key
$ gpg --gen-key
# List Keys
$ gpg --list-secret-keys --keyid-format LONG
# Show Public Key Block
$ gpg --armor --export F5900F8A49F4FB76
# Add Key to git Config
View SetScratch.ps1
# Parameters
$ClusterName = "win"
$DatastoreName = "scratch00"
# Get Cluster
$Cluster = Get-Cluster -Name $ClusterName
# Disable VM DRS Roles
$Cluster | Get-DrsRule | Set-DrsRule -Enabled:$false
vMarkusK / Start-ClusterPatch.ps1
Created Dec 11, 2019
Site Aware Patching with VMware Update Manager
View Start-ClusterPatch.ps1
function Start-ClusterPatch {
[Parameter(Mandatory=$True, ValueFromPipeline=$True, HelpMessage="vSphere Cluster to Patch")]
[VMware.VimAutomation.ViCore.Impl.V1.Inventory.ComputeResourceImpl] $Cluster,
[Parameter(Mandatory=$True, ValueFromPipeline=$false, HelpMessage="Site to Process")]
[String] $SiteToProcess,
vMarkusK / Get-VamiHeatlth.ps1
Created Apr 11, 2019
vCenter VAMI Health for Influx API
View Get-VamiHeatlth.ps1
# External References
# Config
$vCenter = "<vCenter FQDN>"
$Metrics = "applmgmt","database-storage","load","mem","software-packages","storage","swap","system"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
# Create Credentials
#$Credentials = Get-Credential -Message "Vami Crendetials"
vMarkusK / VeeamvCloudAutoCreateJob.ps1
Last active Aug 11, 2019
Veeam vCloud Auto Create Job
View VeeamvCloudAutoCreateJob.ps1
Param (
[Parameter(Mandatory=$True, ValueFromPipeline=$False, HelpMessage="Veeam BR Credentials")]
[Parameter(Mandatory=$True, ValueFromPipeline=$False, HelpMessage="Veeam BR Server")]
[Parameter(Mandatory=$True, ValueFromPipeline=$False, HelpMessage="Veeam Backup Job Scale-Out Repository Name")]
vMarkusK / EsxiHostConfig.ps1
Created Jan 15, 2019
VMware ESXi Base Config
View EsxiHostConfig.ps1
function Set-MyESXiOption {
[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
vMarkusK / EsxiHostHardening.ps1
Created Jan 15, 2019
VMware ESXi Host Base Hardening
View EsxiHostHardening.ps1
foreach ($VMhost in (Get-VMHost))
#Stop SSH Service
$ServiceList = Get-VMHostService -VMhost $VMhost
$SSHservice = $ServiceList | Where-Object {$_.Key -eq "TSM-SSH"}
If ($SSHservice.Running -eq $true) {Stop-VMHostService -HostService $SSHService -Confirm:$false}
else {Write-Output "SSH Server on host $VMhost is Stopped"}
$Shellservice = $ServiceList | Where-Object {$_.Key -eq "TSM"}
If ($Shellservice.Running -eq $true) {Stop-VMHostService -HostService $Shellservice -Confirm:$false}
else {Write-Output "Shell Server on host $VMhost is Stopped"}