OpsMgr agents not showing up in pending management

1 minute read


It has been a long time since I worked with OpsMgr but I encountered a rather strange issue lately. Some manually installed agents sitting behind a Gateway were not showing up in pending management state so I couldn’t approve them, but other agents were fine.  I even enabled “automatically approve new manually installed agents” for a while, reinstalled the agent but still nothing.

OpsMgr agent approval

As some agents were reporting correctly and showing up immediately in pending management I had a look in the OpsMgr database. You can check which agents are in pending management with this SQL query (run on OperationsManager database). To view the database information on pending actions:

select * from agentpendingaction

opsmgrdb agent pending database

You can do the same with PowerShell. Open a command shell, and run the following:


opsmgr powershell agent Get-SCOMPendingManagement

To see a prettier view:

Get-SCOMPendingManagement | ft agentname,agentpendingactiontype [/xml]

Now that we could see all our pending agents, you can approval them with Powershell with the  –Approve-SCOMPendingManagement  switch.

To approve them all

Get-SCOMPendingManagement | Approve-SCOMPendingManagement

To approve specific agent

Get-SCOMPendingManagement | where {$_.AgentName -eq “ServernameFQDN”} | Approve-SCOMPendingManagement


So once this worked I investigated a bit more to found out the root cause of this issue. It seemed that the agents that were stuck in agent pending state in the database had been installed before the final Gateway configuration was done to allow the gateway to act as proxy server. One final step for the gateway server is to configure it as a Proxy. In the Operations Console go to the Administration **space, then click on Management Servers then find the gateway box you just added, Double Click on it. In the Management Server Properties Click the Security tab. Check the box Allow this server to act as a proxy

OpsMgr gateway proxy

Hope this helps,

Leave a comment