Bulk Enable Port Monitoring for Network Devices

Default port monitoring for network devices is disabled. You’ll need to manually look and what ports are important to enable. It really is useless to enable ALL the ports, but if you DO need to have them all enabled it’s really frustrating opening every network device. You will need to click on the Network Node Dashboard, select all the ports and ‘Enable Port Monitoring’, mehhh. There’s a few to enable OR disable all the port monitoring in once.

Enable Port Monitoring

Import-Module OperationsManager
$ins = Get-SCOMClassInstance | ? {$_.displayname -like “PORT-*”}

foreach ($i in $ins) {get-scomtask | ?{($_.Target.Identifier.Path -like “System.NetworkManagement.NetworkAdapter”) -and ($_.DisplayName -like “Enable Port*”)} | Start-SCOMTask -Instance $i}

Disable Port Monitoring

Import-Module OperationsManager
$ins = Get-SCOMClassInstance | ? {$_.displayname -like “PORT-*”}

foreach ($i in $ins) {get-scomtask | ?{($_.Target.Identifier.Path -like “System.NetworkManagement.NetworkAdapter”) -and ($_.DisplayName -like “Disable Port*”)} | Start-SCOMTask -Instance $i}

NB make sure you check what portnames to be enabled (PORT- can be changed to IF- or else). Also not all ports might be enabled. This might give loads of unhealthy ports ;–)

Comments