PS> Get-NetTCPConnection-RemotePort443-State Established
LocalAddress LocalPort RemoteAddress RemotePort State AppliedSetting OwningProcess ---------------------------------------------------------------------------- 192.168.2.1055864052.114.74.221443 Established Internet 14204 192.168.2.1055620152.114.75.149443 Established Internet 9432 192.168.2.1055620052.114.142.145443 Established Internet 13736 192.168.2.1055619913.107.42.12443 Established Internet 12752 192.168.2.1055619813.107.42.12443 Established Internet 9432 192.168.2.1055619240.101.81.162443 Established Internet 9432 192.168.2.10556188168.62.58.130443 Established Internet 10276 192.168.2.10556181168.62.58.130443 Established Internet 10276 192.168.2.1055610313.107.6.171443 Established Internet 9432 192.168.2.1055609513.107.42.12443 Established Internet 9432 192.168.2.1055609413.107.43.12443 Established Internet 9432 192.168.2.10555959140.82.112.26443 Established Internet 21588 192.168.2.1055556852.113.206.137443 Established Internet 13736 192.168.2.1055555551.103.5.186443 Established Internet 12752 192.168.2.1054963851.103.5.186443 Established Internet 5464
不幸的是,Get-NetTCPConnection 有严格的限制。例如,它无法解析 IP 地址或进程 ID,因此您无法轻松发现所连接的服务器名称以及维护连接的程序。并且仅在 Windows 系统上可用。