I am authoring a management pack in XML and using the authoring console in System Center. For testing the MP I created, I need to install agents on machines that have my distributed app running.
SCOM Operations Manager 2012 agent installation fails with
One or more computers you are trying to manage are already in the process of being managed
I know this issue should be resolved from the database - do you know what SQL queries I should run to remove the machines I am trying to install agents on from the pending actions table?
Back up the database!
Execute the following query:
SELECT AgentPendingActionId
FROM AgentPendingAction
WHERE AgentName like 'computername'
This should output any single entry that points to the same agent.
DECLARE @ActionId uniqueidentifier
SET @ActionId =
(
SELECT AgentPendingActionId
FROM AgentPendingAction
WHERE AgentName like 'computername'
)
EXEC p_AgentPendingActionDeleteByIdList @AgentPendingActionIdList = @ActionId
Once you complete this, you should be able to re-run agent discovery and successfully install the agent.