How to remove SCOM management group from console

Mohamed SAKHO 126 Reputation points
2022-02-04T16:08:20.887+00:00

Hello

I'm not a SCOM specialist, but I have to remove scom management group on many servers but from the SCOM console, then uninstall all clients on all server and uninstall it, in order to dismiss the scom configuration. I think it's possible but I don't know how to do this. I found this following article:

https://argonsys.com/microsoft-cloud/library/scom-task-to-add-or-remove-management-groups-on-agents/

But I don't know how create the administration pack including the tasks. Does somebody can help me please.
By Advance Thank you for your answers

System Center Operations Manager
System Center 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,602 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AlexZhu-MSFT 6,591 Reputation points Moderator
    2022-02-07T06:10:46.747+00:00

    Hi,

    If I understand correctly, we want to destroy the entire deployment, right? If that is the case, we can uninstall the scom agent first, and then uninstall scom server itself.

    To uninstall the scom agent, we can find the agent, right-click, choose uninstall or we can use the script like below if the agent number is huge
    Note: this is only a sample script to show how it works and you may need to modify it according to your actual environment.

    $computers = get-content c:\temp1\comp.txt  # each hostname in one line  
    foreach ($computer in $computers)  
    {  
        $computer = $computer + ".domain.com"  # your actual domain suffix here  
        Get-SCOMAgent -DNSHostName $computer | Uninstall-SCOMAgent  
     write-host "the scom agent uninstallation on computer"$computer" was complete!"  
    }  
    

    171746-scom-agent-uninstall-02.png

    171747-scom-agent-uninstall.png

    To uninstall the scom server itself, just open the control panel, find the scom one, and choose uninstall.

    If we are on a multi-homed enviroment (each agent reports to several management servers in different management groups) and we want to reduce the number of management group, we may refer to this scipt.

    https://www.powershellgallery.com/packages/OperationsManagerFever/1.1.0/Content/Functions%5CRemove-SCOMAgentManagementGroup.ps1

    Alex

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.