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
$DAPs = @("DAP01.lan.local","DAP02.lan.local") #MediaSever | |
$DPCs = @("DPC01.lan.local") #Cell Server | |
$TempPath = "D:\OmniBackData\tmp" #Path to DP Temp Files | |
foreach ($DAP in $DAPs) { | |
Write-Output "Testing $DAP..." | |
if (Test-WsMan $DAP) { | |
Write-Output "Processing $DAP..." | |
Invoke-Command -ComputerName $DAP -ScriptBlock {Get-Service -Name omniInet | Stop-Service} | |
Invoke-Command -ComputerName $DAP -ScriptBlock {Get-ChildItem $TempPath | Remove-Item -Confirm:$False -Recurse} |
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 | |
Moves a VM betwenn vSphere Datacenters | |
.DESCRIPTION | |
Changes Host, Datastore and Cluster. | |
.EXAMPLE | |
myMove-VM.ps1 -VMname "yourVM" -newCluster "yourCluster" -NewDS "yourDS*" -VIServer "yourvCenter.lan.local" | |
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
var SIDs_Request = RH_XXXXD2D.createRequest("GET", '/storeonceservices/cluster/servicesets/' , null); | |
SIDs_Request.setHeader('Accept', 'text/xml'); | |
var SIDs_Response = SIDs_Request.execute(); | |
var SIDs_XML = XMLManager.fromString(SIDs_Response.contentAsString); | |
var SIDs_Elements = SIDs_XML.getElementsByTagName("serviceset"); | |
var SIDs_Count = SIDs_Elements.length; | |
System.log ("Number of SIDs:" + SIDs_Count + " on " + RH_XXXXD2D.name); | |
var Stores_Count = 0; | |
for (var i = 1; i <= SIDs_Count; i++) { |
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
# Workaround for SelfSigned Cert | |
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) { | |
return true; | |
} |
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 vCenter Advanced Sensor | |
.DESCRIPTION | |
Advanced Sensor will Report vCenter Statistics about Resource usage. | |
.EXAMPLE | |
PRTG-vCenter.ps1 -VIServer vCenter.lan.local -Check DS |
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 |
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
@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
# 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
<# | |
.NOTES | |
=========================================================================== | |
Created by: Markus Kraus | |
Twitter: @vMarkus_K | |
Private Blog: mycloudrevolution.com | |
Organization: Vater Operations GmbH | |
Organization Site: vater-cloud.de | |
=========================================================================== | |
Changelog: |