Remove-DisabledMonitoringObject not working


Today I got stuck in a strange issue, where the Remove-DisabledMonitoringObject cmdlet apparently stopped to work. It always returned in success but no object (or very few) is removed for the disabled discovery (btw I was fighting with a TMG MP bug, more on this in a later post).

The first step I tried is to invoke the cmdlet with -debug parameter and this was the output

image

As you can see I confirmed the action and the cmdlet ended in exception. Obviously I checked the ID and it was referring to a now deleted object I used to ask why was still in console (alas I don’t have the time to track every single unexpected behavior).

I then re-executed  the cmdlet and this time it finished successfully and objects were indeed removed.

Conclusion: is Remove-DisabledMonitoringObject doesn’t seem to work, just invoke it with the -debug parameter. In my case this fixed the issue.

– Daniele

This posting is provided "AS IS" with no warranties, and confers no rights.

Advertisements
  1. #1 by Amy on July 9, 2014 - 12:22 pm

    i ran the command Remove-SCOMDisabledClassInstance -Debug for scom 2012. But it still the same issue. so have have to continue run the cmd.

  2. #2 by Kevin Holman on April 8, 2011 - 3:55 pm

    I have seen this many times – where this cmdlet must be run multiple times…. in order to remove objects… typically due to an exception caused by a timing issue when removing an object that is already deleted by removing an object previously that was hosting the object that caused the exception. I just keep re-running it until it completes. I havent see this though…. very interesting.

    • #3 by Daniele Grandini on April 9, 2011 - 9:33 am

      Hi Kevin,
      in my case just rerun the cmdlet didn’t help, I tried at least 4 times before trying the -debug switch.
      -Daniele

  3. #4 by Dan Nichols on April 6, 2011 - 11:35 pm

    I too saw this issue recently when adding and removing management packs during MP development. I re-ran the Remove-DisabledMonitoringObject (without the debug) switch and it ran cleanly the second time.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

%d bloggers like this: