Step 1:
Open up cmd.exe (note: you may need to run it as an administrator, but this isn’t always necessary), then run the below command:
netstat -ano | findstr :<PORT>
(Replace <PORT>
with the port number you want, but keep the colon)

The area circled in red shows the PID (process identifier). Locate the PID of the process that’s using the port you want.
Step 2:
Next, run the following command:
taskkill /PID <PID> /F
(No colon this time)

Lastly, you can check whether the operation succeeded or not by re-running the command in “Step 1”. If it was successful you shouldn’t see any more search results for that port number.
Related Posts:
- How do I test if Python is installed on Windows (10), and run an exe to install it if its not installed?
- Windows equivalent to UNIX pwd
- Command line for looking at specific port
- “rm -rf” equivalent for Windows?
- “rm -rf” equivalent for Windows?
- What is the reason for the CD /D switch in Windows cmd?
- Windows 7 – ‘make’ is not recognized as an internal or external command, operable program or batch file
- Ping with timestamp on Windows CLI
- What is the Windows equivalent of the diff command?
- Command prompt won’t change directory to another drive
- Changing all files’ extensions in a folder with one command on Windows
- What is the reason for the error message “System cannot find the path specified”?
- How to run powershell script from .ps1 file?
- ‘git’ is not recognized as an internal or external command
- How to list files in windows using command prompt (cmd). I’ve tried using ‘ ls ‘ as in Linux but it shows an error?
- ‘git’ is not recognized as an internal or external command
- ” is not recognized as an internal or external command, operable program or batch file
- How can you find out which process is listening on a TCP or UDP port on Windows?
- How can I open a cmd window in a specific location?
- Create an empty file on the commandline in windows (like the linux touch command)
- Need to navigate to a folder in command prompt
- How do I create a Batch file to change an exe installer to Win XP SP3 compatibility mode and launch installer
- ” is not recognized as an internal or external command, operable program or batch file
- Access is denied in windows cmd.Why?
- How to “comment-out” (add comment) in a batch/cmd?
- The filename, directory name, or volume label syntax is incorrect inside batch
- stop all instances of node.js server
- javac not working in windows command prompt
- Moving file using cmd?
- How to force `findstr` to ignore `Cannot open` returns
- #1045 – Access denied for user ‘root’@’localhost’ (using password: YES)
- How to “comment-out” (add comment) in a batch/cmd?
- python is not recognized windows 10
- “if not exist” command in batch file
- “if not exist” command in batch file
- Defining and using a variable in batch file
- How to run PowerShell in CMD
- How to open an elevated cmd using command line for Windows?
- xcopy returns error “Invalid number of parameters” when exclude parameter is set
- PHP is not recognized as an internal or external command in command prompt
- ‘openssl’ is not recognized as internal or external command
- XCOPY: Overwrite all without prompt in BATCH
- How to grant permission to users for a directory using command line in Windows?
- Curl not recognized as an internal or external command, operable program or batch file
- Redirecting Output from within Batch file
- How does the echo command works in batch programming
- How to split large text file in windows?
- Windows CMD command for accessing usb?
- Aliases in Windows command prompt
- How do I use spaces in the Command Prompt?
- Calling dir in cmd prints out: “Volume in drive C has no label.”
- How to extract or unpack an .ab file (Android Backup file)
- Desktop: The system cannot find the specified path
- WordPress fails to install with “Can’t Select Database” Error (WAMPServer)
- Custom permalink gives 404 error only in some pages
- Search and Replace in Windows XAMPP site
- Saving Permalinks Results in 403 MAMP (Windows)
- Failed to upload image on localhost
- What port should I open to allow remote desktop?
- How to check if a port is blocked on a Windows machine?
- How do you free up a port being held open by dead process?
- What exactly are DLL files, and how do they work?
- How to fix “VirtualBox Interface has active connections” error in Windows?
- How to fix “VirtualBox Interface has active connections” error in Windows?
- ‘pip’ is not recognized as an internal or external command
- javac is not recognized as an internal or external command, operable program or batch file [closed]
- javac is not recognized as an internal or external command, operable program or batch file [closed]
- The application was unable to start correctly (0xc000007b)
- ‘python’ is not recognized as an internal or external command [duplicate]
- Why is “MINGW64” appearing on my Git bash?
- How can I update npm itself?
- outputting ascii table in C++
- Using %PROGRAMFILES(x86)% on Windows OS 32bit
- how to get program files x86 env variable?
- Difference between masm32 and masm?
- http://localhost/phpMyAdmin/ unable to connect
- Can’t start Eclipse – Java was started but returned exit code=13
- Can’t start Eclipse – Java was started but returned exit code=13
- How do I start PowerShell from Windows Explorer?
- Tensorflow import error: No module named ‘tensorflow’
- scp with port number specified
- A fatal error occurred while creating a TLS client credential. The internal error state is 10013
- Unexplained crashes related to ntdll.dll
- How can I install pip on Windows?
- scp with port number specified
- How to log in to phpMyAdmin with WAMP, what is the username and password?
- How to upgrade Git on Windows to the latest version
- PermissionError: [Errno 13] Permission denied
- What does “@” mean in Windows batch scripts
- Permanently add a directory to PYTHONPATH?
- difference between command prompt and anaconda prompt
- What are good grep tools for Windows? [closed]
- How to run a PowerShell script
- bash: npm: command not found?
- How to add to the PYTHONPATH in Windows, so it finds my modules/packages?
- Install an apk file from command prompt?
- How do I install and use cURL on Windows?
- Install an apk file from command prompt?
- Failed to write core dump. minidumps are not enabled by default on client version of windows
- No “Proceed Anyway” option on NET::ERR_CERT_INVALID in Chrome on MacOS