How to fetch Network Devices from Microsoft SCOM using powershell cmdlet?

Nirali Shah 146 Reputation points
2024-12-12T07:13:01.9+00:00

We are working on fetching devices from Microsoft System Center Operations Manager(SCOM) using powershell cmdlet. We have found the commands to fetch Windows Computers and Linux Computers but unable to find command to fetch Network Devices.

Can anyone let us know about this?

We are following this reference for powershell commands: https://learn.microsoft.com/en-us/powershell/module/operationsmanager/?view=systemcenter-ps-2022

Operations Manager
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,515 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. XinGuo-MSFT 20,156 Reputation points
    2024-12-13T02:29:12.1966667+00:00

    Hi,

    You can use the Get-SCOMClass and Get-SCOMClassInstance cmdlets in PowerShell to fetch network devices from SCOM.

    Here is a basic example to get you started:

    # Get the class for network devices
    $networkDeviceClass = Get-SCOMClass -DisplayName "Network Device"
    
    # Get instances of the network device class
    $networkDevices = Get-SCOMClassInstance -Class $networkDeviceClass
    
    # Display the network devices
    $networkDevices | Select-Object DisplayName, IPAddress
    

    This script retrieves the class for network devices and then fetches instances of that class. Finally, it displays the network devices along with their display names and IP addresses.

    Getting SCOM monitored network devices

    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.