CODE: [Copy to clipboard]for /f "tokens=3" %%i in ('netstat -n -p tcp|find "ESTABLISHED"') do echo %%i