I need a command line that can check the port status on a remote host. I tried ping xxx.xxx.xxx.xxx:161 but it doesn't recognize the "host". I thought it was a "good" answer until I did the same command against a host I know has that port open. This is for a batch file on Windows that will check the status of the remote port then run a command that uses that remote port for information, then the remote port check command again, then the command that uses that port on the next server for information, and so on. I've looked everywhere and thought the ping might do it, but there must be various versions of ping, I suppose as the server I am doing this on does not show that option.
Just for chuckles, I tried a web-based remote port checker from a website - and the results were correct for both the "problem" server and the correct server. However, I can't use that in a batch run with 500+ server IPs in it.
Is there something I can do that is simple? My perl skills are extremely rusty (use it or lose it), don't know any other windows based langs except DOS. Unix is my skill, but this must be executed from win2003.