NETSTAT  is a very useful tool for checking your network activity and network configuration (Show LISTEN processes). netstat also supports a set of options to display active or passive sockets.

 

Example 1: To check what is the Port and services using by the system.

C:\>netstat -a|findstr /i listen

TCP    hostname:ftp            hostname.company.domain.com:0  LISTENING

TCP    hostname:http           hostname.company.domain.com:0  LISTENING

TCP    hostname:epmap          hostname.company.domain.com:0  LISTENING

TCP    hostname:https          hostname.company.domain.com:0  LISTENING

TCP    hostname:microsoft-ds   hostname.company.domain.com:0  LISTENING

TCP    hostname:1054           hostname.company.domain.com:0  LISTENING

 

Example 2: To check what is the Port and services using by the system.

C:\>netstat -an|findstr /i listen

TCP    0.0.0.0:21             0.0.0.0:0              LISTENING

TCP    0.0.0.0:80             0.0.0.0:0              LISTENING

TCP    0.0.0.0:135            0.0.0.0:0              LISTENING

TCP    0.0.0.0:443            0.0.0.0:0              LISTENING

TCP    0.0.0.0:445            0.0.0.0:0              LISTENING

TCP    0.0.0.0:1054           0.0.0.0:0              LISTENING

TCP    0.0.0.0:2701           0.0.0.0:0              LISTENING

TCP    0.0.0.0:2702           0.0.0.0:0              LISTENING