This project is read-only.
1
Vote

Fixes from the SourceForge forum user ilgrank

description

Don't know if the culprit is PS 2.0 /PSCX 2.21, but I had to change these two lines from
$EventLogEntryTypeList = $config["EventLogEntryType"].Split(",").Replace('"',"").Trim()
$EventLogSourcesList = $config["EventLogSources"].Split(",").Replace('"',"").Trim()

to
$EventLogEntryTypeList = $config["EventLogEntryType"].Replace('"',"").Trim().Split(",")
$EventLogSourcesList = $config["EventLogSources"].Replace('"',"").Trim().Split(",")

because I was getting errors (since you did replace after split, replace can't work on an array)

and modify this line
if (($EventLogCount -gt 0) -and ($config["EventLogHaltOnDiskError"] -eq 1)) {


to
if (($EventLogCount -gt 1) -and ($config["EventLogHaltOnDiskError"] -eq 1)) {


because get-eventlog would return ",,,," (4 commas) if it found no errors, thus triggering HaltOnDiskErrors condition.

Thanks for your script, I hope you can continue to update it :)

comments