Handy Shell Command for Windows

1: Find the process on specfic port

netstat –ano |findstr “27000″

Find the process whose status is LISTENING, and the 2700 is the PID of the process. Please note that different environment may have different result.

2:Find the process’s name

tasklist |findstr “2700”

Here the result is mongod.exe, and this is in my test environment, you may get a different result.

3: Kill the Process

Type the command taskkill /im mongod.exe /f as shown below.

Published by codeblogforfun

Coder, blogger, traveler

Leave a comment

Design a site like this with WordPress.com
Get started