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
# Load ImageBuilder Snapin (if not already loaded) | |
if (!(Get-PSSnapin -name VMware.ImageBuilder -ErrorAction:SilentlyContinue)) { | |
if (!(Add-PSSnapin -PassThru VMware.ImageBuilder)) { | |
# Error out if loading fails | |
write-host "`nFATAL ERROR: Cannot load the ImageBuilder Snapin. Is the PowerCLI installed?`n" | |
exit | |
} | |
} | |
cls | |
# Definde Global |
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
# Importing the CSV-file containing the NIC configuration. | |
$NICs = Import-Csv "C:\Scripts\NICs.csv" | Where-Object {$_.computername -eq $env:COMPUTERNAME} | |
foreach ($NIC in $NICs) { | |
$NetAdapter = Get-NetAdapter | Where-Object {$_.MacAddress -eq $NIC.MAC} | |
if ($NetAdapter) { | |
Write-Verbose "Found NIC $($NIC.NIC)" |
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 VcVMConfigSpec = new VcVirtualMachineConfigSpec(); | |
var changeValue = new Array(); | |
System.log ("Config From Array:"); | |
for (var i = 0; i < VcVmConfig.length; i++) { | |
System.log ("Name: " + VcVmConfig[i].key + " - " + "Value: " + VcVmConfig[i].value); | |
changeValue[i] = new VcOptionValue(); | |
changeValue[i].key = VcVmConfig[i].key; | |
changeValue[i].value = VcVmConfig[i].value; | |
} |
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
############################################################################# | |
# HP 3PAR PS Extend | |
# Written by Markus Kraus | |
# Version 1.0 | |
# | |
# https://mycloudrevolution.wordpress.com/ | |
# | |
# Changelog: | |
# 2016.02 ver 1.0 Base Release | |
# |
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
############################################################################# | |
# 3Par Reporting | |
# Written by Markus Kraus | |
# Version 1.2 | |
# | |
# https://mycloudrevolution.wordpress.com/ | |
# | |
# Changelog: | |
# 2016.01 ver 1.0 Base Release | |
# 2016.02 ver 1.1 Added more CPG Details / Changed VV Space Calculation |
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
$ESXiHostList = Get-VMHost | |
$syslog = "udp://syslog.test.lan:514" | |
$NTP1 = "192.168.2.1" | |
$NTP2 = "192.168.2.2" | |
foreach ($ESXiHost in $ESXiHostList) | |
{ | |
#Enable SSH and disable SSH Warning | |
$SSHService = $ESXiHost | Get-VMHostService | where {$_.Key -eq 'TSM-SSH'} | |
Start-VMHostService -HostService $SSHService -Confirm:$false |
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
$ESXiHostList = Get-VMHost | |
foreach ($ESXiHost in $ESXiHostList) | |
{ | |
#Configure HP 3PAR SATP/PSP Rule | |
$SATPesxcli = $ESXiHost | Get-EsxCli | |
$SATPesxcli.storage.nmp.satp.rule.add($null,"tpgs_on","3PAR custom rule",$null,$null,$null,"VV",$null,"VMW_PSP_RR","iops=100","VMW_SATP_ALUA",$null,$null,"3PARdata") | |
Write-Host $ESXiHost ": HP 3PAR SATP/PSP Rule, configured." | |
#Disable ATS HB (http://kb.vmware.com/kb/2113956) |
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
# Start of Settings | |
# Bronze Limit | |
[int]$B_Limit = "250" | |
# Silber Limit | |
[int]$S_Limit = "1000" | |
# Gold Limit | |
[int]$G_Limit = "-1" | |
# VM IOPS Limits, do not report on any VMs who are defined here | |
$VMTDoNotInclude = "VM01*|VM01*" | |
# End of Settings |
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
@ECHO OFF | |
setlocal | |
:: global variables | |
set log=D:\syslog\sessions.log | |
set maxbytesize=1000 | |
:: cleanup logic | |
IF NOT EXIST "%log%" GOTO :Write | |
FOR /F "usebackq" %%A IN ('%log%') DO set size=%%~zA |
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 | |
PRTG vCenter Advanced Sensor | |
.DESCRIPTION | |
Advanced Sensor will Report vCenter Statistics about Resource usage. | |
.EXAMPLE | |
PRTG-vCenter.ps1 -VIServer vCenter.lan.local -Check DS |
OlderNewer