列出所有正在监听的端口(包含程序名称)
Get-NetTCPConnection -State Listen | `
Select-Object LocalAddress,LocalPort,RemoteAddress,RemotePort,State, `
@{Name="Process";Expression={(Get-Process -Id $_.OwningProcess).ProcessName}}, `
OwningProcess,AppliedSetting | `
Format-Table