How to: Port Scan in CMD

Techwalla may earn compensation through affiliate links in this story. Learn more about our affiliate and product review process here.

The Windows command prompt utility netstat allows you to scan your computer to learn whether it has any programs or services listening for incoming connections over the Internet. In most cases, legitimate programs such as anti-virus update services cause your computer to listen for incoming connections. However, in some cases the netstat utility can help you spot a vulnerability caused by a virus or malicious software. Run the netstat utility from an elevated Windows command prompt.

Advertisement

Step 1

Open the Start menu, and type "cmd" in the "Search programs and files" field at the bottom.

Video of the Day

Step 2

Right-click the "cmd" icon when it appears on the result list. Select "Run as Administrator" on the context menu. Type an Administrator password and press "Enter" if the computer prompts you for administrative credentials.

Advertisement

Step 3

Type "netstat -a" in the Command Prompt window, and press "Enter." The computer displays a list of all open TCP and UDP ports.

Advertisement

Step 4

Look for any port number that displays the word "LISTENING" under the "State" column. Your computer is listening for incoming connection requests over these port numbers. Look the port numbers up using an online list to determine the programs and services associated with those ports.

Advertisement

Advertisement

references & resources

Report an Issue

screenshot of the current page

Screenshot loading...