Some programs are indispensable for an admin’s tool kit. PSexec is one of those tools. It allows you to execute command on a remote computer (similar to RConsole). Originally a SysInternals tool, it is now available from Microsoft at http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx.
This batch file will use PSExec to run netstat on a remote system and return the open http connections.
@echo off
if %1z == z set /p PCName=computername?: &goto main
set PCName=%1:main
psexec \\%PCName% netstat | find /i “http”
\