This little gem is fabulous.
Here’s the use case: Your environment has about a million MPs that have been imported by a long storied line of SCOM professionals that came before you and have long since gone. You have no idea if all these MPs are even being used anymore. There could be a bunch that aren’t even monitoring anything because the servers they were originally targeted at have all moved on to the graveyard. The only thing you know is its definitely time to clean house!
This script along with MP Viewer (http://www.systemcentercentral.com/download/mp-viewer-for-operations-manager-2012-2/) is a good start and can help you with identifying MPs that aren’t doing anything. Just put in your management server name and filter your MPs by name or have it go through all of them by using a “*”. It will then export a list of classes for each MP and let you know if they are empty or not.
Download the script here: https://gallery.technet.microsoft.com/SCOM-PowerShell-Get-Empty-cd632e89