jeudi 9 avril 2015

Windows batch script to see if a sequence of server/ports is open?

I can run a single command to see if a port is open:



portqry -n servername -e 80


I want to run this against a list of servers:



  1. DEV1 80

  2. DEV2 80

  3. DEV3 80

  4. TEST1 80

  5. TEST2 80

  6. PROD 80


I want to test them all using a single Windows batch script and see which portsare open and which ones are closed. (And I don't want it to fall over on the first closed port).


My question is: Is there a Windows batch script to see if a sequence of server/ports is open?


Additional: I'm aware there are other questions asking how to check if a port is open. None of them are about scripting it for a sequence of ports in a reliable way.


Aucun commentaire:

Enregistrer un commentaire