Today I was asked for a list of all Servers that we have configured in SCOM, plus the IP Addresses that it’s configured with. This is pretty easy to do and here’s how.
At the time I had open the SQL Management Studio so I chose to query the Operations Manager Database directly:
SELECT DisplayName, IPAddress
And that will return exactly what we want. The Hostname and the IP Address for our Windows agents. This will also return SCOM Management Servers, Gateways and any Unix Machines you have an agent installed on.
Of course we can use Windows PowerShell for that too:
Get-SCOMAgent | select DisplayName, IPAddress
Just be aware that using the Get-SCOMAgent cmdlet won’t return SCOM Management Servers or Unix Servers…we can use the Get-SCOMManagementServer and Get-SCXAgent cmdlets for that.