I've seen this posted in various places around the Internet, and all of them seem to come up dry.
I'm in the process of decommissioning several different gateway servers. They are being rebuilt and redeployed, with redundancy.
I have successfully built new gateways, and re-homed all agents to them. I've reconfigured my Unix/Linux resource pools, and removed all of the "old" gateways from all resource pools.
We have UCS here, and I've configured the instances via Authoring to point to the new gateways.
They should not be monitoring anything within the organization.
Running the command:
$Gateway=Get-SCOMGatewayManagementServer | where {$_.Name -ieq "<GatewayName>"}
Get-SCOMAgent -Managementserver $Gateway
Returns nothing. This actually returned nothing before we corrected the UCS management, so I believe this is only going to show me agent managed objects, and not agentless, as well as anything else that may be monitored by a particular Gateway (or Management
Server, frankly. We will be decommissioning several of those in the next week, assuming we can get our Gateways turned down.)
As I am sure you would expect from the previous statements, attempting to run:
Microsoft.EnterpriseManagement.gatewayApprovalTool.exe /ManagementServerName=<ManagementServer> /GatewayName=<GatewayServer> /Action=Delete
fails with the error:
The removal of server <Gateway> failed because it is remotely managing devices and/or computers. From the Agent Management view, you must first delete, or change the proxy agent of, all network devices or agentless managed computers
monitored by server <Gateway>.
How do I discover everything that isn't an agent being monitored by a particular Gateway, so that I can address it? Or conversely, is there a script somewhere that can automagically "re-home" so to speak, everything that is being monitored to a
new Gateway?
Thanks,
--Scott