netstat -ano|findstr ""

在""之间 输入程序 pid 可以查询 程序所有端口

         输入端口号可以查看所属的程序

 

tasklist|findstr ""

可以查看指定 pid 的程序的信息。