I'm looking to gather only the PID value outputted when you run this netstat command:
netstat -a -o -n -p tcp | findstr -i "CLOSE_WAIT"
My intention is to use the PIDs and create a script that will run taskkill /PID pidfoundhere
to remove any sockets with CLOSE_WAIT state.