You can set up a custom monitor in SCOM with a PowerShell script with the help of Cookdown's PowerShell authoring management pack.
Here's a YouTube video on how to set up a PowerShell monitor that runs a script with Cookdown's PowerShell authoring management pack.
https://www.youtube.com/watch?v=--wOzKU52JE
Here's also a guide that you can follow:
Example of setting up a custom monitor in SCOM with a Powershell Script – Monitor NIC teams in SCOM
As for the netstat monitoring, you can follow up on Ruben's great guide here:
Monitor network connections and listening ports with SCOM
----------
(If the reply was helpful please don't forget to upvote or accept as answer, thank you)
Best regards,
Leon