Here’s one more Knowledge Base article we published today. This one talks about how to remove orphaned SCOM 2007 agents using PowerShell:
In a System Center Operations Manager 2007 R2 Command shell, you may see agents that are still in a pending management state even though they do not appear under pending management in the Operations Manager console.
This can occur if there are agent records left behind in the Operations Manager database. At some point these agents were deployed to a management server manually but later that management server was decommissioned and the agents were never properly removed.
Follow the steps below to resolve this issue.
In this example we assume we have two agent systems named Agent1.contoso.msft and Agent2.contoso.msft. Both agents were assigned to a management server named
that no longer exists. In your environment you would substitute the names for your specific agents and management server.