Scom Group Deletion

richard scott 106 Reputation points
2020-09-28T10:26:17.67+00:00

Hi All ,

I'm hoping someone may be able to assist in the below
I need to delete 100+ empty and redundant groups from SCOM however I cannot find a property to pass the get-scomgroup function to achieve this
can anyone confirm if this is possible ?
the only way I can see is to delete one by one from the console which is not really efficient 60+ seconds per deletion with no multiple selections

Operations Manager
Operations Manager
A family of System Center products that provide infrastructure monitoring, help ensure the predictable performance and availability of vital applications, and offer comprehensive monitoring for datacenters and cloud, both private and public.
1,413 questions
0 comments No comments
{count} votes

Accepted answer
  1. SChalakov 10,261 Reputation points MVP
    2020-09-28T10:47:04.767+00:00

    Hi Richard,

    I am not quite sure what do you mean exactly with

    "I cannot find a property to pass the get-scomgroup function to achieve this"

    Can you please give an example?

    What is the problem of getting all the empty groups and removing those, using this (uses the SDK) for example:

    Automating OpsMgr Part 10: Deleting Groups

    Thanks and Regards,
    Stoyan

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Leon Laude 85,651 Reputation points
    2020-09-28T12:10:31.673+00:00

    Hi @richard scott ,

    As far as I know you cannot delete SCOM groups with the SCOM PowerShell module, you can however use the SCOM SDK to achieve this.
    Stoyan provided a great link for automating this, you can use the script provided in Tao's blog.

    You can also refer to the SCOM SDK below on how to delete SCOM groups and attempt to script the rest:

    How to Delete a Group
    https://learn.microsoft.com/en-us/previous-versions/system-center/developer/hh329082(v=msdn.10)

    ----------

    (If the reply was helpful please don't forget to upvote or accept as answer, thank you)

    Best regards,
    Leon

    1 person found this answer helpful.
    0 comments No comments

  2. richard scott 106 Reputation points
    2020-09-28T14:13:23.523+00:00

    as usual thanks both for your help on this,
    unfortunately the Link to download the module from that site is dead. I did however find it in his GitHub page and it has been added to the powershellgallery

    https://www.powershellgallery.com/packages/OpsMgrExtended/1.3.0