How to Delete a list of Agents from "Agent Managed" in SCOM Console

Saiyad Rahim 371 Reputation points
2024-05-30T00:42:35.9666667+00:00

Have a situation where Team have been updating Server OS without following process of informing Monitoring Admin or stopping the Monitoring Agent. Have tried to follow Kevin Holman's blog for a few servers and it works but now i am dealing with about a hundred: https://kevinholman.com/2019/07/01/do-you-have-duplicate-logical-disks-in-scom/

Does anyone have any powershell to expedite this process for list of Servers?

Delete Agents from SCOM and once they show up in Pending Management, does anyone have any powershell to Bulk Approve all these agents?

I know after that i will have to go into SQL and use Kevin's SQL query to make them "Console Managed".

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,435 questions
Microsoft System Center
Microsoft System Center
A suite of Microsoft systems management products that offer solutions for managing datacenter resources, private clouds, and client devices.
883 questions
0 comments No comments
{count} votes

Accepted answer
  1. XinGuo-MSFT 15,246 Reputation points
    2024-05-30T06:47:04.6533333+00:00

    Hi,

    To bulk approve agents in SCOM once they appear in Pending Management, you can use the Set-SCOMAgentApprovalSetting cmdlet with the -AutoApprove parameter. This will automatically approve any new manually installed agents that contact the management server. Here's an example of how you might use this cmdlet:

    Set-SCOMAgentApprovalSetting -AutoApprove
    

    This command sets the manual agent approval setting for the management group to automatically approve any manually installed agent that contacts the management server and joins the agent to the management group.

    https://learn.microsoft.com/en-us/powershell/module/operationsmanager/set-scomagentapprovalsetting?view=systemcenter-ps-2022

    0 comments No comments

0 additional answers

Sort by: Most helpful