JR

Some local Check_MK checks that were created to execute check_MK local check scripts (Powershell) in 64-bit context, monitor Exchange 2007 health (Storage Group replication status, Log Truncation after backups, etc.), and monitor DNS scavenging on Windows servers:

@echo off
REM Note that SysNative is available on x86 2008, and on x86 2003 with KB942589 applied

set CONSOLE_WIDTH=500
CD %ProgramFiles(x86)%\check_mk\local-64
FOR /R %%X IN ("*") DO ( %WINDIR%\SysNative\windowspowershell\v1.0\powershell.exe -File "%%X")
$Host.UI.RawUI.BufferSize = New-Object Management.Automation.Host.Size(900,900)

Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin

$check_name = "Exchange_SG_LogTrunc"

$OK = 0
$Warn = 1
$Crit = 2
$Unk = 3
$Host.UI.RawUI.BufferSize = New-Object Management.Automation.Host.Size(900,900)

Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin



$check_name = "Exchange_SG_CopyStatus"

$OK = 0
$Warn = 1
$Host.UI.RawUI.BufferSize = New-Object Management.Automation.Host.Size(500,300)

$server = $env:COMPUTERNAME


$global:debug = ""
$global:n_stat = ""
$global:n_stattext = ""