SCOM How to Get Ressource Pool from object networkdevice in Powershell

Miguet Yeung 6 Reputation points
2021-03-03T13:40:13.993+00:00

Hello there

We are doing a side to side upgrade for our SCOM env. from 2012 to 2019.
To compare the network devices, we're currently writing a powershell script, which compares the devices from env. A to the new env. B. and lists the missing devices for either env.

The problem we have is, we don't know how to get information about the resource pool a specific device is monitored with.

Our Commands in the script to get the network devices:

$class = Get-SCOMClass -name "System.NetworkDevice"
$list = Get-SCOMMonitoringObject -Class:$class

Is there any option to get the responsible resource pool from a selected networkdevice?

As far as we know, there is no correlation between the command get-SCOMressourcePool and the System NetworkDevices.

If there is no possiblity to get the resource pool of a network device via powershell, there would propably be a way to get the resource pool via SQL query. However, we don't know the opsman database too well, so it's pretty difficult for us to find the information we're looking for.

Thank you for your help.

Regards
Miguet Yeung

System Center Operations Manager
System Center Operations Manager
A family of System Center products that provide infrastructure monitoring, help ensure the predictable performance and availability of vital applications, and offer comprehensive monitoring for datacenters and cloud, both private and public.
1,602 questions
Windows for business Windows Server User experience PowerShell
SQL Server Other
{count} vote

1 answer

Sort by: Most helpful
  1. CyrAz 5,181 Reputation points
    2021-03-03T18:24:18.24+00:00

    Try this to find network devices belonging to a given resource pool :
    Get-SCOMRelationshipInstance -SourceInstance (get-scomclassinstance -DisplayName "network resource pool") | select targetobject -unique

    It shouldn't be too difficult to make it work the other way around if you prefer.

    Edit : the idea here is that the relationship between a network object and its resource pool is an instance of a SCOM Relationship, exactly in the same way as between a SCOM group and its members.
    More specifically, there actually is one instance of two distinct relationships between the resource pool object (relationship source) and every network object it manages (relationship target) :

    • one instance of the Microsoft.SystemCenter.ManagementActionPointShouldManageEntity relationship
    • one instance of the Microsoft.SystemCenter.ManagementActionPointManagesEntity relationship
      Using one or the other shouldn't make any difference in your case, you don't need both.

    So by using this, you can play around to find what objects are managed by a given resource pool, or what resource pool manages one given network object.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.