Automatically detect active ports per server?

Automatically detect active ports per server?

Hi Team -

A lot of the services I need to monitor are through ports. Therefore, I am manually setting up all the ports in 24x7 that pertain to the processes I need to monitor.  Is there a way to install the msiexec.exe and have it automatically detect active ports, create the Resource profile for each port, and begin monitoring?

There are normally 15 ports per server I am currently configuring.

Thanks!