Fix Orphaned SCOM Agents

You may have an Agent not displaying in Console as Pending but it is In pending according to DB. If you run the commandshell as per below you can confirm if this is the case.

Get-AgentPendingAction | where {$_.AgentName -eq “StuckAgentFQDN”}

This happens when a Management Server is removed and the Agents were not removed correctly. It leaves an Orphaned record I guess..

NOTE Before executing any query against the Operations Manager database be sure that a complete and current backup exists.

-Run the following queries

SELECT AgentPendingActionId
FROM AgentPendingAction WHERE AgentName like ‘StuckAgentFQDN’

Result = Action ID:
2A5C2E8F-2AD4-1703-D3BE-4755DF1A8E2E

Then Execute QUERY:-
DECLARE @ActionId uniqueidentifier
SET @ActionId = (SELECT AgentPendingActionId
FROM AgentPendingAction WHERE AgentName like ‘StuckAgentFQDN)
EXEC p_AgentPendingActionDeleteByIdList @AgentPendingActionIdList = @ActionId

http://blogs.technet.com/b/momteam/

Advertisements
This entry was posted in Agent. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s