Hi Matt
A work in Progress... I'm facing some challanges. Can't figure out what's going on.
Here is a copy of my script so far:
$Res = Exec-Sproc -Conn $SqlConnection -Sproc "Web.GetpoweradminServermonitorAlarms"
if ($Res -gt $null)
{
foreach ($Row in $Res)
{
$StoredError = $mon.GetValue($Row[0])
$mon.ReportResults()
if ($StoredError -eq "")
{
$NewError="yes"
$ErrorDetail = "`r`n" + $Row[1] + "`r`n" + $Row[2] + "`r`n" + $Row[3]
$mon.StoreValue($Row[0],$ErrorDetail)
$mon.Details = $ErrorDetail
$mon.FireActions=$true
}
else
{
$NewError="no"
$mon.Details = $StoredError
$mon.FireActions=$true
}
}
}
To summen up - the script runs a stored procedure that returns 2 rows/records.
Problem 1:
The stored procedure is returning 2 records (Checked in Management Studion):
> ID | Title | Exeption | Environment | Processed
Processed
> 79 a a Udvikling False
> 80 b b Test False
When I run the script inside the Console (Production) i get this result:
> Multiple responses were received from
> the script. They would be processed
> as: Do Not Fire Actions:
>
> Fire Actions: a a Udvikling
>
> Fire Actions: b b Test
When I test the script for real (Let it run on a Schedule - it only returns the first record (action is send mail). And immediatly it gets "Fixed".
What am I missing?
Hope this gives meaning!
Kind regards
Karsten StoltenStolten