Remove List of SCOM Orphaned Agents in PowerShell

Remove List of SCOM Orphaned Agents in PowerShell

I faced this need for a customer need, so I wanted to share with you this little article. In order to remove a list of SCOM orphaned agents (e.g. computer doesn’t exist anymore) you can use this script. Obviously, it will only remove agents from SCOM console, but it will not uninstall agent from the computer (we will see how to manage this in another article).

You can actually use either a plain list of gray agents or .csv file as input of the array.

One thought on “Remove List of SCOM Orphaned Agents in PowerShell

Leave a Reply

Your email address will not be published. Required fields are marked *