IT Knowledge Base

~ Without sacrifice, there can be no victory ~

發佈日期:

如果利用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

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *