SCOM 2012 – UPDATE: SCOM Task Collection MP

A few weeks ago I started with a Task Collection MP found on this post. As I am getting new ideas I will add more tasks to make life easier. In the latest version SCOM Task Collection MP version I added 3 more tasks…


First here brief overview of the current tasks which were found in version

01) Turn Firewall On
This task will turn on the windows firewall .

02) Turn Firewall Off
Well, it explains itself. The task will turn off the windows firewall for all profiles.

03) Get Logged On User
If you need to know who is currently logged on console and RDP sessions then you will run this task. It shows you also if the session is active or disconnected.

04) Get Computer Uptime
This task shows you the last boot time and the uptime of the computer.

05) Get Local Admins
This tasks shows you the users which are in the local administrators group on the respective computer.

06) Get Free Disk Space
Sometimes you need to know quickly the free disk space of the logical disks and also its disk sizes.

07) Get Pending Reboot
This task will check if there is a pending reboot for the computer.

08) Set Dirty Bit
This is an old “thing”, but I had a couple of times the need for running check disk at boot time. This task will set the dirty bit on drive C:, so that the server will run check disk the next time it starts.

09) Get DNS Settings
This task shows you the configured DNS server settings and the server’s IP address.

10) Fix Support Tool Path
If you try to execute Active Directory related tasks from the Active Directory management pack like DCDiag, Repadmin etc. they will not work because the path to these tools has changed on Windows 2008 (R2) domain controllers. I have written a blog post about it. This task will create the necessary symbolic link as written here to get it working.

New are task 11, 12 and 13:

11) Remove Management Group from Agent
If you have multi-homed agents which report to two management groups your agent will have two management group settings. This scenario is very likely in a SCOM side-by-side migration where you have the SCOM 2012 agent reporting to SCOM 2007 R2 AND SCOM 2012. If you need to remove one of the management group settings from the agent you can execute this task. You just need to provide the management group name (click the Override button and type the management group name) which you want to remove from the agent in the format:



12) Add Management Group to Agent
If you need to add another management group setting to an agent you can execute this task. Just select a managed Windows computer in SCOM, run this task and click the Override button. You need to provide 3 parameters:

  • Management group name
  • SCOM management server
  • Port (usually port 5723)

The values need to be in the format:



13) Mark Windows Server in Registry
This task is able to write 2 registry values into two predefined registry keys. First, this tasks creates a key in HKLM\SOFTWARE\SpecialKeys . Within this key two additional keys are generated one is called Category and one is called Team. Now you can add values to Category and Team if you run this task click Override and provide the values in the following format:


This would write PRODUCTION into the Category key and SQL into the Team key, the task looks like this…


…and the result like this…


Well, you think now cool and so what? My intension is to have a quick way to set registry values to which will be discovered by attributes in SCOM. These attributes which discover the Category and Team key could be used to build dynamic groups based on the respective value in SCOM.

Now what do you think, huh Smiley?

If you want to delete the registry values (not the keys!) just execute the task as it is without modifying anything.

If you are new or not familiar with dynamic groups and attributes Kevin Holman wrote some time ago a blog post.

I added just 3 more tasks but I think they will be very useful and there is more to come. You can download the SCOM Task Collection MP here from skydrive.


  1. nice, i have similar, i call it scom.stupid.admin.tricks. mostly similar, some more specific to our needs, had a task library in tivoli doing the same thing, people don’t understand if you have an agent on the machine you own the machine, consider modifying group memeberships and see what your audit people think 🙂

  2. Is there a way to use this in opsmgr2007R2? Error when importing:
    This management pack cannot be imported.
    : XSD verification failed for management pack. [Line: 1, Position: 40]
    The ‘SchemaVersion’ attribute is not declared.

  3. I try to modify the task for 13) of the scripts and create new agent task that suit our need but it showing errors.

    The Event Policy for the process started at 2:41:11 PM has detected errors in the output. The ‘StdErr’ policy expression:

    matched the following output:

    C:\Program Files\System Center 2012\Operations Manager\Server\Health Service State\Monitoring Host Temporary Files 58\538199\SetRegistryKeys.vbs(1, 24) Microsoft VBScript compilation error: Expected end of statement

    Command executed: “C:\Windows\system32\cscript.exe” /nologo “SetRegistryKeys.vbs” “MY-KLDC” “CP2”

    Working Directory: C:\Program Files\System Center 2012\Operations Manager\Server\Health Service State\Monitoring Host Temporary Files 58\538199\

    One or more workflows were affected by this.

    Workflow name: ConsoleTaskGeneratedByUI79063720d76d4eab9acbdc74945765a0

    Instance name: XXX

    Instance ID: {2EE5C6AF-9370-E069-A347-9835106CF1AD}

    Management group: XXX

    Error Code: -2130771918 (Unknown error (0x80ff0032)).

    What it could be wrong

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s