ScriptPropertyBagProbe

Hi,
I am following the example provided in HDI-TechNet-SystemCenter-winvideo-PowerShellRuleMonitor.wmv to build a custom monitor in 2007R2 Auth Console.  The difference is I am using a VB and not PS script.
The first deviation is I don't see a TriggerOnly probe module for VB.  As per 2007R2 Auth Guide, it seems that without a TriggerOnly, on-demand detection will not be supported.  So I added System.PassThroughProbe first.  Is this the correct
way to support on-demand detection using this probe module?
Then I added ScriptPropertyBagProbe which requires Argument.
I hoped Argument was the same as Parameter in the PowerShellPropertyBagTriggerOnly probe module used in the video, but it did not seems so after I added into <Arguments> the following:
<Argument><Name>folder_path</Name><Value>$Config/folder_path$</Value></Argument>
This generated the error: The element 'Arguments' cannot contain child element 'Argument' because the parent element's content model is text only
So I changed it to simply <Arguments>$Config/folder_path$</Arguments> which did not error.
Is this going to achieve the same result, ie. accept as a parameter the folder path to be used within the script?
May I assume that if I want to pass multiple parameters, then I would separate each using a space?
Or are parameters and arguments completely different in the context of probe modules?
Thanks for any help provided!

hi 
<Arguments
/> is used in the vbscript base monitoring. in powershell need to use <Parameters>
as below.
<Parameters>
<Parameter>
<Name>ComputerName</Name>
<Value>$Config/ComputerName$</Value>
</Parameter>
</Parameters>
refer below link for more information
http://technet.microsoft.com/en-us/library/ff381420.aspx
Regards
sridhar v

Similar Messages

  • Multiple Alerts for one Monitor

    Hi All,
    I have a MP to monitor a scheduled task and get the last run status of the task and fire an alert if it is sort of not running.
    The alert is getting generated and getting closed for every 15 min(schedule time of the monitor). But this alert is getting repeated. I dont see any fault in my mp.
    and the code goes this way:
    <?xml version="1.0" encoding="utf-8"?>
    <ManagementPack SchemaVersion="2.0" ContentReadable="true" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <Manifest>
        <Identity>
          <ID>ReviewerRecommendationNightlyJob</ID>
          <Version>1.0.0.26</Version>
        </Identity>
        <Name>ReviewerRecommendationNightly</Name>
        <References>
          <Reference Alias="Windows">
            <ID>Microsoft.Windows.Library</ID>
            <Version>7.5.8501.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="Health">
            <ID>System.Health.Library</ID>
            <Version>7.0.8433.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="System">
            <ID>System.Library</ID>
            <Version>7.5.8501.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
        </References>
      </Manifest>
      <TypeDefinitions>
        <EntityTypes>
          <ClassTypes>
            <ClassType ID="Reviewer.Recommendation.Nightly.ScheduleTaskService" Accessibility="Public" Abstract="false" Base="Windows!Microsoft.Windows.LocalApplication" Hosted="true" Singleton="false"
    Extension="false" />
            <ClassType ID="Reviewer.Recommendation.Nightly.rrn" Accessibility="Public" Abstract="false" Base="Windows!Microsoft.Windows.ApplicationComponent" Hosted="true" Singleton="false"
    Extension="false">
              <Property ID="Path" Type="string" AutoIncrement="false" Key="false" CaseSensitive="false" MaxLength="256" MinLength="0" Required="false" Scale="0"
    />
              <Property ID="ID" Type="string" AutoIncrement="false" Key="true" CaseSensitive="false" MaxLength="256" MinLength="0" Required="false" Scale="0"
    />
            </ClassType>
          </ClassTypes>
          <RelationshipTypes>
            <RelationshipType ID="Reviewer.Recommendation.Nightly.ScheduleTaskServicehostTask.rrn" Accessibility="Public" Abstract="false" Base="System!System.Hosting">
              <Source ID="Source" MinCardinality="0" MaxCardinality="2147483647" Type="Reviewer.Recommendation.Nightly.ScheduleTaskService" />
              <Target ID="Target" MinCardinality="0" MaxCardinality="2147483647" Type="Reviewer.Recommendation.Nightly.rrn" />
            </RelationshipType>
          </RelationshipTypes>
        </EntityTypes>
        <ModuleTypes>
          <DataSourceModuleType ID="Reviewer.Recommendation.Nightly.ScheduledTask.ClassDiscovery" Accessibility="Public" Batching="false">
            <Configuration>
              <IncludeSchemaTypes>
                <SchemaType>System!System.Discovery.MapperSchema</SchemaType>
                <SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType>
              </IncludeSchemaTypes>
              <xsd:element minOccurs="1" name="IntervalSeconds" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
              <xsd:element minOccurs="1" name="SyncTime" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
              <xsd:element minOccurs="1" name="TargetComputer" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
              <xsd:element minOccurs="1" name="Expression" type="ExpressionType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
              <xsd:element minOccurs="1" name="ClassId" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
              <xsd:element minOccurs="1" name="InstanceSettings" type="SettingsType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
            </Configuration>
            <OverrideableParameters>
              <OverrideableParameter ID="IntervalSeconds" Selector="$Config/IntervalSeconds$" ParameterType="int" />
              <OverrideableParameter ID="SyncTime" Selector="$Config/SyncTime$" ParameterType="string" />
            </OverrideableParameters>
            <ModuleImplementation Isolation="Any">
              <Composite>
                <MemberModules>
                  <DataSource ID="SimpleScheduler" TypeID="System!System.SimpleScheduler">
                    <IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
                    <SyncTime>$Config/SyncTime$</SyncTime>
                  </DataSource>
                  <ProbeAction ID="ScheduledTaskProbe" TypeID="Reviewer.Recommendation.Nightly.ScheduledTask.Probe">
                    <TargetComputer>$Config/TargetComputer$</TargetComputer>
                  </ProbeAction>
                  <ConditionDetection ID="FilteredClassSnapshotDataMapper" TypeID="System!System.Discovery.FilteredClassSnapshotDataMapper">
                    <Expression>$Config/Expression$</Expression>
                    <ClassId>$Config/ClassId$</ClassId>
                    <InstanceSettings>$Config/InstanceSettings$</InstanceSettings>
                  </ConditionDetection>
                </MemberModules>
                <Composition>
                  <Node ID="FilteredClassSnapshotDataMapper">
                    <Node ID="ScheduledTaskProbe">
                      <Node ID="SimpleScheduler" />
                    </Node>
                  </Node>
                </Composition>
              </Composite>
            </ModuleImplementation>
            <OutputType>System!System.Discovery.Data</OutputType>
          </DataSourceModuleType>
          <ProbeActionModuleType ID="Reviewer.Recommendation.Nightly.ScheduledTask.Probe" Accessibility="Public" Batching="false" PassThrough="false">
            <Configuration>
              <xsd:element minOccurs="1" name="TargetComputer" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
            </Configuration>
            <ModuleImplementation Isolation="Any">
              <Composite>
                <MemberModules>
                  <ProbeAction ID="Probe" TypeID="Windows!Microsoft.Windows.ScriptPropertyBagProbe">
                    <ScriptName>ScheduledTask.Probe.Script.vbs</ScriptName>
                    <Arguments>$Config/TargetComputer$</Arguments>
                    <ScriptBody>
                      Option Explicit
                      Dim oArgs, strTargetComputer, strOutput
                      Set oArgs = WScript.Arguments
                      strTargetComputer = oArgs(0)
                      'create the container for the properties
                      Dim oAPI, oBag
                      Set oAPI = CreateObject("MOM.ScriptAPI")
                      strOutput = "Ouput from script"
                      'Finding the Operating System version, as this will impact how we discover tasks later on
                      'W2KorWXP=Windows 2000 Professional or Server, or Windows XP
                      'W2K3=Windows Server 2003
                      'W2K8orHigher=Windows Vista, Windows Server 2008, Windows 7, Windows Server 2008 R2 =&gt; Where tasks can be accessed using scripting
                      Dim strComputer, objWMIService, colOperatingSystems, objOperatingSystem, HostVersion
                      strComputer = strTargetComputer
                      Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &amp; strComputer &amp; "\root\cimv2")
                      Set colOperatingSystems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
                      For Each objOperatingSystem in colOperatingSystems
                      If (Left(objOperatingSystem.Version, 3) = "5.0" or Left(objOperatingSystem.Version, 3) = "5.1") Then HostVersion = "W2KorWXP"
                      If (Left(objOperatingSystem.Version, 3) = "5.2") Then HostVersion = "W2K3"
                      If (Left(objOperatingSystem.Version, 3) = "6.0" or Left(objOperatingSystem.Version, 3) = "6.1" or objOperatingSystem.Version = "6.3.9600") Then HostVersion = "W2K8orHigher"
                      Next
                      strOutput = strOutput &amp; Chr(10) &amp; "HostVersion: " &amp; HostVersion
                      'Discovering scheduled tasks, using a different technique
                      'A different technique is used for Windows Server 2003 and earlier (schtasks.exe) and for Windows Server 2008 and higher (scripting)
                      'Actions of type Command Line are also discovered for Windows Server 2008 and later (so we can monitor their executable target existence
                      Dim intRow
                      intRow = 1
                      If (HostVersion = "W2K8orHigher") Then
                      Dim rootFolder, service
                      Set service = CreateObject("Schedule.Service")
                      call service.Connect()
                      Set rootFolder = service.GetFolder("\")
                      Call GetTasks(rootFolder)
                      End If
                      'return the container to SCOM
                      Call oAPI.ReturnItems()
                      Call oAPI.LogScriptEvent("ScheduledTaskProbe.vbs", 112, 0, strOutput)
                      Function GetTasks(oFolder)
                      Dim taskCollection , registeredTask, oFld
                      Set taskCollection = oFolder.GetTasks(0)
                      If taskCollection.Count &lt;&gt; 0 Then
                      For Each registeredTask In taskCollection
                      Set oBag = oAPI.CreatePropertyBag()
                      Call oBag.AddValue("RowNumber", intRow)
                      intRow = intRow + 1
                      Call oBag.AddValue("TaskName", registeredTask.Name)
                      Call oBag.AddValue("TaskUserId", registeredTask.Definition.Principal.UserId)
                      Call oBag.AddValue("TaskEnabled", registeredTask.Enabled)
                      Call oBag.AddValue("TaskAuthor", registeredTask.Definition.RegistrationInfo.Author)
                      Call oBag.AddValue("TaskPath", registeredTask.Path)
                      Call oBag.AddValue("TaskStatus", registeredTask.LastTaskResult)
                      Call oBag.AddValue("TaskLastTaskResult", registeredTask.LastTaskResult)
                      Call oBag.AddValue("TaskLastRunTime", registeredTask.LastRunTime)
                      Call oBag.AddValue("TaskNextRunTime", registeredTask.NextRunTime)
                      Call oBag.AddValue("TaskState", registeredTask.State)
                      Call oBag.AddValue("TaskNumberOfMissedRuns", registeredTask.NumberOfMissedRuns)
                      Call oBag.AddValue("TaskMinutesSinceLastRunTime", DateDiff("n", registeredTask.LastRunTime, Now()))
                      Call oBag.AddValue("TaskMinutesUntilNextRunTime", DateDiff("n", Now(), registeredTask.NextRunTime))
                      Call oBag.AddValue("TaskDescription", registeredTask.Definition.RegistrationInfo.Description)
                      oAPI.AddItem(oBag)
                      strOutput = strOutput &amp; Chr(10) &amp; "Task: " &amp; registeredTask.Name
                      Next
                      End If
                      For each oFld in oFolder.GetFolders(0)
                      Call GetTasks(oFld)
                      Next
                      End Function
                    </ScriptBody>
                    <TimeoutSeconds>300</TimeoutSeconds>
                  </ProbeAction>
                </MemberModules>
                <Composition>
                  <Node ID="Probe" />
                </Composition>
              </Composite>
            </ModuleImplementation>
            <OutputType>System!System.PropertyBagData</OutputType>
            <InputType>System!System.TriggerData</InputType>
          </ProbeActionModuleType>
        </ModuleTypes>
        <MonitorTypes>
          <UnitMonitorType ID="Reviewer.Recommendation.Nightly.ScheduledTask.MonitorType" Accessibility="Public">
            <MonitorTypeStates>
              <MonitorTypeState ID="GreenState" NoDetection="false" />
              <MonitorTypeState ID="RedState" NoDetection="false" />
            </MonitorTypeStates>
            <Configuration>
              <IncludeSchemaTypes>
                <SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType>
              </IncludeSchemaTypes>
              <xsd:element minOccurs="1" name="IntervalSeconds" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
              <xsd:element minOccurs="1" name="SyncTime" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
              <xsd:element minOccurs="1" name="TargetComputer" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
              <xsd:element minOccurs="1" name="RedExpression" type="ExpressionType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
              <xsd:element minOccurs="1" name="GreenExpression" type="ExpressionType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
            </Configuration>
            <MonitorImplementation>
              <MemberModules>
                <DataSource ID="SimpleScheduler" TypeID="System!System.SimpleScheduler">
                  <IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
                  <SyncTime>$Config/SyncTime$</SyncTime>
                </DataSource>
                <ProbeAction ID="ScheduledTaskProbe" TypeID="Reviewer.Recommendation.Nightly.ScheduledTask.Probe">
                  <TargetComputer>$Config/TargetComputer$</TargetComputer>
                </ProbeAction>
                <ConditionDetection ID="GreenExpressionFilter" TypeID="System!System.ExpressionFilter">
                  <Expression>$Config/GreenExpression$</Expression>
                </ConditionDetection>
                <ConditionDetection ID="RedExpressionFilter" TypeID="System!System.ExpressionFilter">
                  <Expression>$Config/RedExpression$</Expression>
                </ConditionDetection>
              </MemberModules>
              <RegularDetections>
                <RegularDetection MonitorTypeStateID="GreenState">
                  <Node ID="GreenExpressionFilter">
                    <Node ID="ScheduledTaskProbe">
                      <Node ID="SimpleScheduler" />
                    </Node>
                  </Node>
                </RegularDetection>
                <RegularDetection MonitorTypeStateID="RedState">
                  <Node ID="RedExpressionFilter">
                    <Node ID="ScheduledTaskProbe">
                      <Node ID="SimpleScheduler" />
                    </Node>
                  </Node>
                </RegularDetection>
              </RegularDetections>
            </MonitorImplementation>
          </UnitMonitorType>
        </MonitorTypes>
      </TypeDefinitions>
      <Monitoring>
        <Discoveries>
          <Discovery ID="ReviewerRecommendationNightlyJob.Reviewer.Recommendation.Nightly.rrn.Discovery" Target="Reviewer.Recommendation.Nightly.ScheduleTaskService" Enabled="true" ConfirmDelivery="false"
    Remotable="true" Priority="Normal">
            <Category>Discovery</Category>
            <DiscoveryTypes />
            <DataSource ID="Task.Class.Discovery.DS" TypeID="Reviewer.Recommendation.Nightly.ScheduledTask.ClassDiscovery">
              <IntervalSeconds>900</IntervalSeconds>
              <SyncTime></SyncTime>
              <TargetComputer>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</TargetComputer>
              <Expression>
                <RegExExpression>
                  <ValueExpression>
                    <XPathQuery>Property[@Name='TaskName']</XPathQuery>
                  </ValueExpression>
                  <Operator>ContainsSubstring</Operator>
                  <Pattern>ReviewerRecommendationNightlyJob</Pattern>
                </RegExExpression>
              </Expression>
              <ClassId>$MPElement[Name="Reviewer.Recommendation.Nightly.rrn"]$</ClassId>
              <InstanceSettings>
                <Settings>
                  <Setting>
                    <Name>$MPElement[Name="Reviewer.Recommendation.Nightly.rrn"]/ID$</Name>
                    <Value>$Data/Property[@Name='TaskName']$</Value>
                  </Setting>
                  <Setting>
                    <Name>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Name>
                    <Value>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Value>
                  </Setting>
                  <Setting>
                    <Name>$MPElement[Name="Reviewer.Recommendation.Nightly.rrn"]/Path$</Name>
                    <Value>$Data/Property[@Name='TaskPath']$</Value>
                  </Setting>
                  <Setting>
                    <Name>$MPElement[Name="System!System.Entity"]/DisplayName$</Name>
                    <Value>$Data/Property[@Name='TaskName']$</Value>
                  </Setting>
                </Settings>
              </InstanceSettings>
            </DataSource>
          </Discovery>
          <Discovery ID="ReviewerRecommendationNightlyJob.Reviewer.Recommendation.Nightly.ScheduleTaskService.Discovery" Target="Windows!Microsoft.Windows.Computer" Enabled="true" ConfirmDelivery="false"
    Remotable="true" Priority="Normal">
            <Category>Discovery</Category>
            <DiscoveryTypes />
            <DataSource ID="DS" TypeID="Windows!Microsoft.Windows.WmiProviderWithClassSnapshotDataMapper">
              <NameSpace>\\$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$\ROOT\CIMV2</NameSpace>
              <Query>select * from Win32_Service where Name='Schedule' and StartMode='Auto'</Query>
              <Frequency>900</Frequency>
              <ClassId>$MPElement[Name="Reviewer.Recommendation.Nightly.ScheduleTaskService"]$</ClassId>
              <InstanceSettings>
                <Settings>
                  <Setting>
                    <Name>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Name>
                    <Value>$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Value>
                  </Setting>
                  <Setting>
                    <Name>$MPElement[Name="System!System.Entity"]/DisplayName$</Name>
                    <Value>ReviewerRecommendationNightly</Value>
                  </Setting>
                </Settings>
              </InstanceSettings>
            </DataSource>
          </Discovery>
        </Discoveries>
        <Monitors>
          <UnitMonitor ID="ReviewerRecommendationNightlyJob.Reviewer.Recommendation.Nightly.rrn.LastStatus" Accessibility="Internal" Enabled="true" Target="Reviewer.Recommendation.Nightly.rrn" ParentMonitorID="Health!System.Health.AvailabilityState"
    Remotable="true" Priority="Normal" TypeID="Reviewer.Recommendation.Nightly.ScheduledTask.MonitorType" ConfirmDelivery="false">
            <Category>AvailabilityHealth</Category>
            <AlertSettings AlertMessage="ReviewerRecommendationNightlyJob.Reviewer.Recommendation.Nightly.rrn.LastStatus.AlertMessage">
              <AlertOnState>Error</AlertOnState>
              <AutoResolve>true</AutoResolve>
              <AlertPriority>Normal</AlertPriority>
              <AlertSeverity>Error</AlertSeverity>
            </AlertSettings>
            <OperationalStates>
              <OperationalState ID="GreenState" MonitorTypeStateID="GreenState" HealthState="Success" />
              <OperationalState ID="RedState" MonitorTypeStateID="RedState" HealthState="Error" />
            </OperationalStates>
            <Configuration>
              <IntervalSeconds>900</IntervalSeconds>
              <SyncTime></SyncTime>
              <TargetComputer>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</TargetComputer>
              <RedExpression>
                <And>
                  <Expression>
                    <SimpleExpression>
                      <ValueExpression>
                        <XPathQuery>Property[@Name='TaskName']</XPathQuery>
                      </ValueExpression>
                      <Operator>Equal</Operator>
                      <ValueExpression>
                        <Value>$Target/Property[Type="Reviewer.Recommendation.Nightly.rrn"]/ID$</Value>
                      </ValueExpression>
                    </SimpleExpression>
                  </Expression>
                  <Expression>
                    <SimpleExpression>
                      <ValueExpression>
                        <XPathQuery>Property[@Name='TaskPath']</XPathQuery>
                      </ValueExpression>
                      <Operator>Equal</Operator>
                      <ValueExpression>
                        <Value>$Target/Property[Type="Reviewer.Recommendation.Nightly.rrn"]/Path$</Value>
                      </ValueExpression>
                    </SimpleExpression>
                  </Expression>
                  <Expression>
                    <Or>
                      <Expression>
                        <SimpleExpression>
                          <ValueExpression>
                            <XPathQuery>Property[@Name='TaskStatus']</XPathQuery>
                          </ValueExpression>
                          <Operator>NotEqual</Operator>
                          <ValueExpression>
                            <Value>0</Value>
                          </ValueExpression>
                        </SimpleExpression>
                      </Expression>
                      <Expression>
                        <SimpleExpression>
                          <ValueExpression>
                            <XPathQuery>Property[@Name='TaskStatus']</XPathQuery>
                          </ValueExpression>
                          <Operator>NotEqual</Operator>
                          <ValueExpression>
                            <Value>267009</Value>
                          </ValueExpression>
                        </SimpleExpression>
                      </Expression>
                      <Expression>
                        <SimpleExpression>
                          <ValueExpression>
                            <XPathQuery>Property[@Name='TaskStatus']</XPathQuery>
                          </ValueExpression>
                          <Operator>NotEqual</Operator>
                          <ValueExpression>
                            <Value>267011</Value>
                          </ValueExpression>
                        </SimpleExpression>
                      </Expression>
                      <Expression>
                        <SimpleExpression>
                          <ValueExpression>
                            <XPathQuery>Property[@Name='TaskStatus']</XPathQuery>
                          </ValueExpression>
                          <Operator>NotEqual</Operator>
                          <ValueExpression>
                            <Value>2147750687</Value>
                          </ValueExpression>
                        </SimpleExpression>
                      </Expression>
                      <Expression>
                        <SimpleExpression>
                          <ValueExpression>
                            <XPathQuery>Property[@Name='TaskStatus']</XPathQuery>
                          </ValueExpression>
                          <Operator>NotEqual</Operator>
                          <ValueExpression>
                            <Value>267012</Value>
                          </ValueExpression>
                        </SimpleExpression>
                      </Expression>
                    </Or>
                  </Expression>
                </And>
              </RedExpression>
              <GreenExpression>
                <And>
                  <Expression>
                    <SimpleExpression>
                      <ValueExpression>
                        <XPathQuery>Property[@Name='TaskName']</XPathQuery>
                      </ValueExpression>
                      <Operator>Equal</Operator>
                      <ValueExpression>
                        <Value>$Target/Property[Type="Reviewer.Recommendation.Nightly.rrn"]/ID$</Value>
                      </ValueExpression>
                    </SimpleExpression>
                  </Expression>
                  <Expression>
                    <SimpleExpression>
                      <ValueExpression>
                        <XPathQuery>Property[@Name='TaskPath']</XPathQuery>
                      </ValueExpression>
                      <Operator>Equal</Operator>
                      <ValueExpression>
                        <Value>$Target/Property[Type="Reviewer.Recommendation.Nightly.rrn"]/Path$</Value>
                      </ValueExpression>
                    </SimpleExpression>
                  </Expression>
                  <Expression>
                    <Or>
                      <Expression>
                        <SimpleExpression>
                          <ValueExpression>
                            <XPathQuery>Property[@Name='TaskStatus']</XPathQuery>
                          </ValueExpression>
                          <Operator>Equal</Operator>
                          <ValueExpression>
                            <Value>0</Value>
                          </ValueExpression>
                        </SimpleExpression>
                      </Expression>
                      <Expression>
                        <SimpleExpression>
                          <ValueExpression>
                            <XPathQuery>Property[@Name='TaskStatus']</XPathQuery>
                          </ValueExpression>
                          <Operator>Equal</Operator>
                          <ValueExpression>
                            <Value>267009</Value>
                          </ValueExpression>
                        </SimpleExpression>
                      </Expression>
                      <Expression>
                        <SimpleExpression>
                          <ValueExpression>
                            <XPathQuery>Property[@Name='TaskStatus']</XPathQuery>
                          </ValueExpression>
                          <Operator>Equal</Operator>
                          <ValueExpression>
                            <Value>267011</Value>
                          </ValueExpression>
                        </SimpleExpression>
                      </Expression>
                      <Expression>
                        <SimpleExpression>
                          <ValueExpression>
                            <XPathQuery>Property[@Name='TaskStatus']</XPathQuery>
                          </ValueExpression>
                          <Operator>Equal</Operator>
                          <ValueExpression>
                            <Value>2147750687</Value>
                          </ValueExpression>
                        </SimpleExpression>
                      </Expression>
                      <Expression>
                        <SimpleExpression>
                          <ValueExpression>
                            <XPathQuery>Property[@Name='TaskStatus']</XPathQuery>
                          </ValueExpression>
                          <Operator>Equal</Operator>
                          <ValueExpression>
                            <Value>267012</Value>
                          </ValueExpression>
                        </SimpleExpression>
                      </Expression>
                    </Or>
                  </Expression>
                </And>
              </GreenExpression>
            </Configuration>
          </UnitMonitor>
        </Monitors>
      </Monitoring>
      <Presentation>
        <StringResources>
          <StringResource ID="ReviewerRecommendationNightlyJob.Reviewer.Recommendation.Nightly.rrn.LastStatus.AlertMessage" />
        </StringResources>
      </Presentation>
      <LanguagePacks>
        <LanguagePack ID="ENU" IsDefault="true">
          <DisplayStrings>
            <DisplayString ElementID="Reviewer.Recommendation.Nightly.ScheduleTaskService">
              <Name>Reviewer Recommendation Nightly class</Name>
              <Description>class for ReviewerRecommendationNightly Job</Description>
            </DisplayString>
            <DisplayString ElementID="Reviewer.Recommendation.Nightly.rrn">
              <Name>Reviewer Recommendation Nightly rrn class</Name>
              <Description>class for ReviewerRecommendationNightly Job</Description>
            </DisplayString>
            <DisplayString ElementID="ReviewerRecommendationNightlyJob.Reviewer.Recommendation.Nightly.rrn.Discovery">
              <Name>ReviewerRecommendationNightlyDiscovery</Name>
              <Description>Discovery for Reviewer Recommendation Nightly Job</Description>
            </DisplayString>
            <DisplayString ElementID="ReviewerRecommendationNightlyJob.Reviewer.Recommendation.Nightly.rrn.LastStatus">
              <Name>ReviewerRecommendationNightlyMonitor</Name>
              <Description>Description for the new unit monitor.</Description>
            </DisplayString>
            <DisplayString ElementID="ReviewerRecommendationNightlyJob.Reviewer.Recommendation.Nightly.rrn.LastStatus.AlertMessage">
              <Name>ReviewerRecommendationNightlyAlert</Name>
              <Description>This alert is to notify that the Task Reviewer Recommendation is not in working state</Description>
            </DisplayString>
            <DisplayString ElementID="ReviewerRecommendationNightlyJob.Reviewer.Recommendation.Nightly.rrn.LastStatus" SubElementID="GreenState">
              <Name>GreenState</Name>
              <Description>GreenState</Description>
            </DisplayString>
            <DisplayString ElementID="ReviewerRecommendationNightlyJob.Reviewer.Recommendation.Nightly.rrn.LastStatus" SubElementID="RedState">
              <Name>RedState</Name>
              <Description>RedState</Description>
            </DisplayString>
            <DisplayString ElementID="ReviewerRecommendationNightlyJob.Reviewer.Recommendation.Nightly.ScheduleTaskService.Discovery">
              <Name>ReviewerRecommendationNightly ScheduleTaskService Discovery</Name>
              <Description>Discovery for Reviewer Recommendation Nightly Job</Description>
            </DisplayString>
          </DisplayStrings>
          <KnowledgeArticles></KnowledgeArticles>
        </LanguagePack>
      </LanguagePacks>
    </ManagementPack>
    Regards, Mahadev Sundeep Maruvada

    Hi,
    Why not to use a event based monitor to detect the Task Schedule running status? I am not familar with VB script, the suggestion I can give is you need to check if the script cannot properly detect the running result of the task Schedule.
    Juke Chou
    TechNet Community Support

Maybe you are looking for

  • How do I update the Apple ID used on my iPhone?

    I changed my Apple ID on my computer and synced my phone but I am still getting a message saying my phone can not update with iCloud. My iPhone is still showing my old Apple ID but I can't access it via iPhone to update it. I have logged in and out o

  • Dvd drive L632B help

    Hi everyone. I have a toshiba satellite A205 and it came with the TssT L632B dvd drive, which is even indicated on the drive itself. I used to burn dvd`s and other cd`s but of late, i noticed that it cannot recognise any blank DVD. Upon checking unde

  • I need to swich from us store to saudi arabian store, please help me to find solution.

    i need to swich from us store to saudi arabian store, please help me to find solution.

  • Message no. V1597

    Hi The order got rejected by mistake- now when we are trying to remove the rejection indicator we are getting the following error But we can not del the po as this has been processed completely and vendor payment has also been made. What can be done

  • URGENT : replacing some letters in an expression

    Hi all I think that I should post this topic here because I think it concerns SQL and PL/SQL functions. Here is the problem : I am developping a forms application . There is a listbox named FORMULA containing list of formulas. When I choose a formula