Measure SCOM Tasks using PowerShell

Sometimes when working with SCOM, one hears that “SCOM is slow” or “the console is taking forever to do this and that”. I won’t be speculating about the reason to why it might be slow with this post though, this could be to many reasons. But let´s say that you move your databases from one SQL Server to another for example, wouldn’t it be great to be able to measure the time it takes to execute several PowerShell commands both before and after the change to see the difference?

That´s exactly what I will provide in this post. In the beginning of the summer I came in a discussion about how to measure the performance of SCOM. Okay, this won´t give a complete picture of how the console works with but it will provide you with some valuable data.

It consists of a PowerShell script that you need to run from a management server or from a server that has the Operations Console installed.

The commands that are measured are the following:

  • Get-SCOMAgent
  • Get-SCOMMonitoringObject
  • Get-SCOMManagementPack
  • Get-SCOMGroup
  • Get-SCOMOverride
  • Get-SCOMRule
  • Get-SCOMMonitor
  • Get-SCOMClass

As you can see, these are some powerful commands so it will take some time to complete depending on how big your environment is.

Get started

Start by downloading the script from TechNet Gallery here and place it on a management server or a server that has the Operations Console installed.

The script looks like below:

Run the script

To run the script, launch a PowerShell session as an administrator and browse to the path where you´ve copied the script.

Launch the script and you will see the result just like in the below picture:


There you go, you got the time it took to complete several commands through PowerShell. Now don´t let my numbers fool you, yes, my servers are running on SSD disks and have the performance they need. But I also have a very limited lab environment, so you will see something completely different when running this in your environment.

I have tried the script in both SCOM 2012 and SCOM 2016 so feel free to use it and modify it as you may like.

If you have any questions about the script, feel free to leave a comment and I´ll get back to you as soon as I can.

6 thoughts on “Measure SCOM Tasks using PowerShell Add Yours?

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.

%d bloggers like this: