windwos查看特定端口使用情况

用管理员 PowerShell 执行:

Get-Service BrokerAgent

Get-NetTCPConnection -State Listen -LocalPort 80,443 | Select-Object LocalAddress, LocalPort, OwningProcess

再用结果中的 PID 查进程:

$ownerPid = <上一步的PID>
Get-CimInstance Win32_Process -Filter "ProcessId = $ownerPid" |
Select-Object ProcessId, Name, ExecutablePath, CommandLine

posted @ 2026-11-03 11:32  爱学习的小瘪三  阅读(4)  评论(0)    收藏  举报