SCOM doesn't provide an easy way to see where a Gateway Server reports to. In our environment, we have around 20 Gateway servers and trying to keep track of what reports where is a nightmare.
I knew there would be a way in Powershell, so I started playing around.
I eventually got this right. Here's the Powershell - it'll export the results to c:\ms.csv
------
$collection = @();
foreach($gatewayServer in Get-GatewayManagementServer)
{
$info = "" | Select GatewayServerName, ReportsToServer
$info.GatewayServerName = $gatewayServer.Name
$info.ReportsToServer = $gatewayServer.GetPrimaryManagementServer().DisplayName
$collection += $info;
}
$collection | Export-Csv c:\ms.csv
No comments:
Post a Comment