SystemCenter

All about System Center Articles and Tutorials

EXPORTING LIST OF COMPUTERS FROM GROUP IN SCOM

Posted by on Jun 30, 2016 in PowerShell, SCOM 2012

EXPORTING LIST OF COMPUTERS FROM GROUP IN SCOM

If we talk about Groups in SCOM 2012, its nothing but the logical collection of objects like: Servers, Storage or DB Instances, etc.. In SCOM, we can create a group by using the Create Group Wizard under Authoring pane. We can explicitly assign the membership to a group or can create rules that will generate a dynamic group membership.

Sometimes we get in a situation wherein we need to view or export the list of computers / objects which are part of a group in SCOM. We can easily view the members of a group by clicking Explicit Members tab under group properties however if we try to export it through GUI it’s not possible as SCOM doesn’t gives us option for multiple selection of group members.

So, we can export the list of computers / objects in a group through PowerShell cmdlet.

We can use Operations Manager Shell or Windows PowerShell. If using Windows PowerShell, we need to import the “OperationsManager” module and its cmdlets by running:

import-module operationsmanager

1

Will start by getting the list of all groups in the Management Group sorted by Display Name:

Get-SCOMGroup | sort DisplayName

2

Since now we have the list of all groups we can copy the exact display name of the group and use that in our below command which will export it’s member objects in CSV format:

Get-SCOMGroup -DisplayName “GROUP DISPLAY NAME” | Get-SCOMClassInstance | export-csv -notype “*PATH\FILENAME.CSV*”

EXAMPLE: Get-SCOMGroup -DisplayName “AB GROUP TEST” | Get-SCOMClassInstance | export-csv -notype D:\GroupMembers\ABGROUPTEST.csv

3

When we check the path, we can see the export file containing list of all the computers which are member of ABGROUPTEST Group.

4

If required, you can covert this file to XLS.

In case of any query or suggestions please comment below.

1 Comment

  1. How about the excluded members in the group list? Is there a way for that to be queried in Powershell?

Submit a Comment

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