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!"
}
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.
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.