發佈日期:
如果利用PowerShell,查詢有關TCP/UDP埠位(TCP/UDP port)應用情況
01. 在Windows Server中,尋找有關TCP埠位(TCP port)是被甚麼程式所佔用。
Get-Process -Id (Get-NetTCPConnection -LocalPort <TCP_port_number>).OwningProcess

02. 在Windows Server中,尋找有關UDP埠位(UDP port)是被甚麼程式所佔用。
Get-Process -Id (Get-NetUDPEndpoint -LocalPort <UDP_port_number>).OwningProcess


發佈留言