SCOM: Test Network Device Discovery with PowerShell

Hi Readers,

Today we will focus on the SCOM Network Device Discovery process. Adding Network Devices in SCOM could be a challenge and time consuming, when an external team has to configure the device to authorize SCOM queries it.
In SCOM, You need to:

  • Create the Run As Account with the Community String
  • Create a Discovery Rule
  • Configure the Discovery settings and Account for the Device you want to add
  • Ensure that the Network device is well configured to let SCOM discover it

If you have a lot of devices and only one SCOM discovery rule, the discovery could take time….and now, if the device is missed configured, you have to re-do everything and wait wait wait….and test….
Let try to speed up this process by ensuring that the device that we want to discover is well configured for SCOM. For that, I wrote the little PowerShell script that you have to run on the MS that will discover and monitor the Network Device.

$IP = '' #Ip of the network device you want to discover
$Community = 'SCOM_******' #Community string configured on the network device for the SCOM monitoring

$SNMP = new-object -ComObject olePrn.OleSNMP


Write-Host "SysName : "$snmp.Get(".")

Write-Host "SysDescription : "$snmp.Get(".")

Write-Host "SysObjectID : "$snmp.Get(".")

Write-Host "SysContact : "$snmp.Get(".")

Write-Host "SysLocation : "$snmp.Get(".")


I targeted the script to a F5 load balancer, the output is below:

Now, that I’m sure that the Network Device is well configured, I could add it to SCOM J

You could of course improve this script by adding a loop for testing multiple devices, reading the devices list from a CSV file, …

I hope this help J


About Christopher Keyaert

Christopher Keyaert is a Consultant, focused on helping partners to leverage the System Center and Microsoft Azure cloud platform. He is also a Microsoft Most Valuable Professional (MVP) for Cloud and Data Center Management and a Microsoft Certified Trainer (MCT).
This entry was posted in Operations Manager. Bookmark the permalink.

One Response to SCOM: Test Network Device Discovery with PowerShell

Leave a Reply

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