Configuration Management Pack Script

SCOM 2012 – SCOM Task Collection MP V 1.0

Update 07.03.2013: There is an updated version of this management pack and post. Please check the post found here.

As the new year just started every one has many New Year’s resolutions, one of mine New Year’s resolution and also driven by customers was to create a SCOM task management pack which should contain as many useful tasks as possible. Today I started with my project and added 10 tasks into the MP. I am sure there are many more needs out there and if you have any requests let me know and I will try to put them into the management pack.

After you imported the management pack you need to navigate to the Windows Computes view and select a computer. On the right side you will see Windows Computer Tasks. For easier finding they are marked with SCOMfaq.

It will look like this…

image

It is important to understand that these tasks are agent tasks and will run on the computer that you select in the console.

Here are short descriptions what each task does and what you will expect to see:

_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.

_Get Computer Uptime
This task shows you the last boot time and the uptime of the computer.

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

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

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

_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.

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

_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.

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

_Turn Firewall On
This task will turn on the windows firewall .

To get an impression how it might look like, here I ran the task _Get Free Disk Space:

image

Most of these task are based on Powershell or old-school utilities like fsutil. In any case the tasks are executed in the Powershell console. Therefore you need Powershell installed on your computers where you want to run the tasks.

I have not tested all possible cases, but if something does not work let me know. Let me also know what you would like to have implemented.

You can download the MP here from skydrive.

I am happy to hear from you!

Stefan

12 Replies to “SCOM 2012 – SCOM Task Collection MP V 1.0

  1. Hello Stefan
    I have followed your blog, and always has been very useful, I learned many things already.
    Congratulations by the tools that you posted. Very good.
    I wonder if you have tips on how to build dashboard in SCOM 2012?
    att,
    Rodrigo

    1. Hi Rodrigo

      Thank you very much for your kind words.

      I am not sure what kind of dashboards you mean. Are you referring “views” as dashboard or the “real” dashboards in SCOM 2012.

      The Operations Manager Team has realeased a tool to generalize dashboards and to shipp it as MP http://blogs.technet.com/b/momteam/archive/2012/06/12/free-windows-server-2008-dashboards-for-opsmgr-2012-and-tool-to-help-create-your-own-customized-dashboards.aspx . I always use the console to build the regular dashboards or then the Visio plug-in to create impressive dashboards for the managers :). Besides that savision has a great tool to build dashboards.

      I hope this helps,

      Stefan

  2. I would like to receive an email (sms msg what ever)
    when a MP task has completed. Optionally by status(succeed, fail)
    Any Ideas?
    Robert Daems

  3. what a great MP. question if u dont mind. for the pending reboot task, may i ask about the ps1……is it essentially just checking a regkey and if the key is populated with a certain value, then it knows if a reboot is pending or not? much appreciated.

    1. Hi

      Yes I am checking this key HKLMSoftwareMicrosoftWindowsCurrentVersionComponent Based Servicing for RebootPending.

      Sorry, needed to crack open the MP :).

      Cheers,

      Stefan

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.