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
############################################################################# | |
# 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 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
############################################################################# | |
# 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 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
$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 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
$ILOs = Import-Csv "C:\ILOs.csv" | |
$user = "user" | |
$password = "Passw0rd!" | |
foreach ($ILO in $ILOs) { | |
Set-HPiLOSNMPIMSetting -Server $ILO.ILO -Username $user -Password $password -SNMPAddress1 192.168.2.1 -SNMPAddress2 192.168.2.2 ` | |
-SNMPADDRESS1ROCOMMUNITY public -SNMPADDRESS1TRAPCOMMUNITYvalue public -SNMPADDRESS1TRAPCOMMUNITYVERSION v1 -SNMPADDRESS2ROCOMMUNITY public ` | |
-SNMPADDRESS2TRAPCOMMUNITYvalue public -SNMPADDRESS2TRAPCOMMUNITYVERSION v1 -AgentlessManagementEnable Yes | |
Add-HPiLOSSORecord -Server $ILO.ILO -Username $user -Password $password -SSOInputType "IMPORT_FROM_NETWORK" ` |
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
$user = "yourUser" | |
$password = "yourPassword" | |
# POST - Authorization | |
$Auth = @{uri = "http://yourVEM.fqdn:9399/api/sessionMngr/?v=v1_2"; | |
Method = 'POST'; #(or POST, or whatever) | |
Headers = @{Authorization = 'Basic ' + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("$($user):$($password)")); | |
} #end headers hash table | |
} #end $params hash table |
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
<# | |
.NOTES | |
=========================================================================== | |
Created by: Markus Kraus | |
Twitter: @vMarkus_K | |
Private Blog: mycloudrevolution.com | |
Organization: Vater Operations GmbH | |
Organization Site: vater-cloud.de | |
=========================================================================== | |
Changelog: |
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
# 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 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
@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 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
$LogPath = "C:\inetpub\logs\LogFiles\W3SVC1\*" | |
$LogFiles = "*.log" | |
[int] $LogRetention = "-30" # in Days | |
Get-ChildItem $LogPath -Include $LogFiles -Recurse | Where-Object {$_.LastWriteTime -lt (Get-Date).AddDays($LogRetention)} | Remove-Item |
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
<# | |
.SYNOPSIS | |
PRTG Veeam Advanced Sensor | |
.DESCRIPTION | |
Advanced Sensor will Report Statistics about Backups during last 24 Hours and Actual Repository usage. | |
.EXAMPLE | |
PRTG-VeeamBRStats.ps1 -BRHost veeam01.lan.local |