SCCM Console Extensions

Some small notes and short (but powerful) example about SCCM Console Extensions…

Some good-to-have GUIDs
You find them all in adminconsole.xml

  • fa922e1a-6add-477f-b70e-9a164f3b11a2 – First-level collections
  • dbb315c3-1d8b-4e6a-a7b1-db8246890f59 – Subcollections
  • 7ba8bf44-2344-4035-bdb4-16630291dcf6 – Resource in collection
  • de41d5d8-3845-4e67-9657-0121f06f5e27 – Programs
  • a1ad0705-ce2d-4981-96f5-8f0faad47396 – Advertisments
  • 49696c48-9c3a-4d4a-bb38-473394700d43 – Site Systems

Some of the SUBs
You find them all in adminconsole.xml

  • ##SUB:__Server##
  • ##SUB:__Namespace##
  • ##SUB:Name##
  • ##SUB:PackageID##
  • ##SUB:ProgramName##
  • ##SUB:SiteCode##
  • ##SUB:SiteName##
  • ##SUB:NetworkOSPath##
  • ##SUB:AddressType##
  • ##SUB:Order##
  • ##SUB:value##
  • ##SUB:ItemName##

Example XML-file:
(Put it to “SCCM\AdminUI\XmlStorage\Extensions\Actions\fa922e1a-6add-477f-b70e-9a164f3b11a2\sccmExtensions.xml”)


        
                C:\sccmExtenstions.vbs
                ##SUB:__Server## ##SUB:__Namespace## ##SUB:Name## ##SUB:PackageID## ##SUB:ProgramName## ##SUB:SiteCode## ##SUB:SiteName## ##SUB:NetworkOSPath## ##SUB:AddressType## ##SUB:Order## ##SUB:value## ##SUB:ItemName##
        

And the script to use
(Put this into C:\sccmExtensions.vbs)

sOut = ""
For i = 0 to WScript.Arguments.Count-1
        sOut = sOut & "Arg " & i+1 & " : " & Wscript.Arguments(i) & vbCrLf
Next
MsgBox sOut

Then, try to right-click a first level collection and select “Show Params”…

Tip
Greg Ramsy’s Console Extensions GUID Locator
;-)

Happy scripting! :-)


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.