3) Find the function "StaticThreshold" and replace the following sections:
Find (Org) - Min
Find (Org) - Min
If ($oCounterInstance.QuantizedMin[$t] -is [System.Char])
{
[System.Int32] $iQuantizedMin = $oCounterInstance.QuantizedMin[$t]
[System.Double] $iQuantizedMin = $iQuantizedMin
}
Else
{
[System.Double] $iQuantizedMin = $oCounterInstance.QuantizedMin[$t]
}
Replace (New) - Min If ($oCounterInstance.QuantizedMin -is [System.String])
{
[System.Double[]] $aQuantizedMin = @($oCounterInstance.QuantizedMin.Split(','))
}
Else
{
[System.Double[]] $aQuantizedMin = @($oCounterInstance.QuantizedMin)
}
$iQuantizedMin = $aQuantizedMin[$t]
Find (Org) - Avg If ($oCounterInstance.QuantizedAvg[$t] -is [System.Char])
{
[System.Int32] $iQuantizedAvg = $oCounterInstance.QuantizedAvg[$t]
[System.Double] $iQuantizedAvg = $iQuantizedAvg
}
Else
{
[System.Double] $iQuantizedAvg = $oCounterInstance.QuantizedAvg[$t]
}
Replace (New) - Avg If ($oCounterInstance.QuantizedAvg -is [System.String])
{
[System.Double[]] $aQuantizedAvg = @($oCounterInstance.QuantizedAvg.Split(','))
}
Else
{
[System.Double[]] $aQuantizedAvg = @($oCounterInstance.QuantizedAvg)
}
$iQuantizedAvg = $aQuantizedAvg[$t]
Find (Org) - Max If ($oCounterInstance.QuantizedMax[$t] -is [System.Char])
{
[System.Int32] $iQuantizedMax = $oCounterInstance.QuantizedMax[$t]
[System.Double] $iQuantizedMax = $iQuantizedMax
}
Else
{
[System.Double] $iQuantizedMax = $oCounterInstance.QuantizedMax[$t]
}
Replace (New) - Max If ($oCounterInstance.QuantizedMax -is [System.String])
{
[System.Double[]] $aQuantizedMax = @($oCounterInstance.QuantizedMax.Split(','))
}
Else
{
[System.Double[]] $aQuantizedMax = @($oCounterInstance.QuantizedMax)
}
$iQuantizedMax = $aQuantizedMax[$t]