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.