I would use SSH to connect and execute the commands on the Linux servers and something like winexe (part of the samba project -
see here) to run the commands on the Windows servers.
Linux - put all the linux servers in a file called linux_list and set up key-based SSH authentication.
Code:
for SERVER in `cat linux_list`
do
ssh user@${SERVER} "netstat -aa" >> ${SERVER}.txt
done
Windows - create a user that can access each of the systems remotely and turn on administrative shares if not already enabled. Put all servers in windows_list
Code:
for SERVER in `cat windows_list`
do
winexe -U DOMAIN\\user //${SERVER} "netstat -aa" >> ${SERVER}.txt
done