Please run the script as System User
The procedure displays Active Network Connections from the Windows Endpoint. The following details will be shown at the ITSM Log once the procedure is successfully completed.
Protocol, Local Address, Foreign Address, State, and Process ID. Moreover, the procedure displays which program currently uses the connection as well.