Thursday, February 9, 2012

[SQL] Get SCOM Groups members using a SQL Query on OperationsManager DB

Here is a short query that is very usefull to list all member of a SCOM group. Use it on your OperationsManager DB :
  1. select DisplayName from RelationShip r with (nolock)
  2. inner join basemanagedentity bme with (nolock) on bme.BaseManagedEntityId = R.TargetEntityId
  3. Where SourceEntityId in (
  4.             select BaseManagedEntityId from basemanagedentity with (nolock)
  5.             where DisplayName LIKE '%GroupName%')
  6. Order by DisplayName

This posting is provided "AS IS" with no warranties.

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete