结束进程

--查看端口号
netstat -ano

--根据条件查找端口号
netstat -ano | findstr "8090"

--查看pid对应的进程
tasklist | findstr "12628"

--结束进程
taskkill /f /t /im javaw.exe



查看tcp排除的端口号:
netsh interface ipv4 show excludedportrange protocol=tcp

协议 tcp 端口排除范围

开始端口    结束端口
----------    --------
     49769       49868
     49869       49968
     50000       50059     *
     50060       50159
     50364       50463
     56825       56924

* - 管理的端口排除。

netsh interface ipv4 delete excludedportrange protocol=tcp startport=50000 numberofports=1

原文地址:https://www.cnblogs.com/cyf18/p/14287028.html