Inline tasks in SCOM

Since I can’t find any documentation on how to create inline tasks in knowledge I did a small reverse engineering on a SCOM MP.

Here is a summary of how to do it:

First you need to create a task that you can refer to. Take a note of your Task ID.

>
  ID="snowland_ServiceMonitor_ConsoleTask" Accessibility="Internal" Enabled="true" Target="snowland_ServiceMonitor_Class" Timeout="300" Remotable="true">
    >
Alert>
    ID="PA" TypeID="System!System.CommandExecuter">
      >
%SystemRoot%\System32\net.exe>
      >%SystemRoot%\System32>
      >START MyService>
      >20>
      >true>
    >
  >
>
 

And when you have the Task ID of your task you can create an inline task (or a link to a view or a website)

xmlns:maml="http://schemas.microsoft.com/maml/2004/10">

        >
Resolutions>
        >Mumbo jumbo text…>
        >
                >
                        >My Task>
                        condition="Task" href="snowland_ServiceMonitor_ConsoleTask&tasktarget={$TARGET$}" uri="MOM.Console.Exe" />
                >

        >

        >
                >
                        >My View>
                        condition="View" href="snowland_ServiceMonitor_MyView&viewtarget={$TARGET$}" uri="MOM.Console.Exe" />
                >

        >

        >
                >My WebLink>
                href="https://snowland.se/" />
        >

>
 

Tip: Use Authoring Console and a XML-editor.