SystemCenter

All about System Center Articles and Tutorials

List of SCOM Management Servers and Agents

Posted by on Aug 17, 2016 in PowerShell, SCOM 2012, SQL

List of SCOM Management Servers and Agents

Many a time our management asks me to send the list of all SCOM Management Servers and Agents so they can showcase the numbers in their presentations.

Obviously it’s not a rocket science to get the list of Agents and Management Servers in SCOM environment. Anyone having administrative access on SCOM environment can get the list.

You can fetch the list of all your Management Servers and Agents using below three methods:

1: Using SCOM console.
2: Using PowerShell cmdlet.
3: Using SQL Query.

I will show you all these three methods for fetching list of both Management Servers and Agents.

So, let’s start..

FETCHING LIST OF MANAGEMENT SERVERS

1. Using SCOM Console

  • Load up SCOM Console.
  • Click on Administration option and select Management Servers.

The list of all Management Servers and Gateway Servers will be displayed here.

1

2: Using PowerShell cmdlet. 

  • Login on to SCOM Management Server.
  • Open PowerShell.
  • Import OperationsManager Module by running below cmdlet:

Import-module OperationsManager

  • Run below cmdlet to get list of all Management Servers:

Get-ScomManagementServer

The list will be displayed as below:

2

Note: If you are running cmdlet on Operations Manager Shell, importing OperationsManager Module is not required.

3. Using SQL Query 

  • Login on to SCOM Database Server
  • Load up SQL Server Management Studio (SSMS).
  • Run below query to get list of all Management Servers:

use OperationsManager
go
SELECT * FROM ManagedEntityGenericView
INNER JOIN ManagedTypeView ON ManagedEntityGenericView.MonitoringClassId=ManagedTypeView.Id
WHERE (ManagedTypeView.Name=’microsoft.systemCenter.managementserver’)
order by ManagedEntityGenericView.DisplayName

The output will be displayed as below:

3

FETCHING LIST OF AGENTS

1. Using SCOM Console

  • Load up SCOM Console.
  • Click on Administration option and select Agent Managed.

The list of all the Agents will be displayed here.

4

2: Using PowerShell cmdlet. 

  • Login on to SCOM Management Server.
  • Open PowerShell.
  • Import OperationsManager Module by running below cmdlet:

Import-module OperationsManager

  • Run below cmdlet to get list of all SCOM Agents:

Get-SCOMAgent

The list will be displayed as below:

5

Note: If you are running cmdlet on Operations Manager Shell, importing OperationsManager Module is not required.

3. Using SQL Query 

  • Login on to SCOM Database Server
  • Load up SQL Server Management Studio (SSMS).
  • Run below query to get list of all SCOM Agents:

use OperationsManager
go
SELECT * FROM ManagedEntityGenericView
INNER JOIN ManagedTypeView ON ManagedEntityGenericView.MonitoringClassId = ManagedTypeView.Id
WHERE (ManagedTypeView.Name = ‘microsoft.systemCenter.agent’)
order by ManagedEntityGenericView.DisplayName

The output will be displayed as below:

6

Hope it will help..

1 Comment

  1. Thank you very much!
    It was helpful.

Submit a Comment

Your email address will not be published. Required fields are marked *