Guest Francis Peixoto Posted July 22, 2008 Posted July 22, 2008 Is there a way to output a full telnet connection process to a file? Here is what I have for other network tests in my script: psexec \\%SERVERIP% route print >> %SERVERNAME%-routeprint.txt psexec \\%SERVERIP% tracert foo.com >> %SERVERNAME%-Tracert.txt psexec \\%SERVERIP% netstat -an >> %SERVERNAME%-netstat.txt SRVINFO -NF \\%SERVERIP% |FIND /I "foo" >> %SERVERNAME%- ServiceStatus.tx When I add a line to telnet to a remote DNS to an specific port, the output file is always empty, whether it connects or fails. the best case scenario would be that I at least get a text output for a fail. I don't care about a success, since the resulting screen would be blank anyways. As it is now, I have to connect to all the servers manually via RDP and telnet then copy/paste into a text file. It wouldn't be so bad if I didn't have about 60 servers to check. any input?
Guest Pegasus \(MVP\) Posted July 22, 2008 Posted July 22, 2008 Re: Batch "Francis Peixoto" <pokrmessiah@gmail.com> wrote in message news:3aeeb324-7fcb-4cfc-b603-ae3165305850@m36g2000hse.googlegroups.com... > Is there a way to output a full telnet connection process to a file? > > Here is what I have for other network tests in my script: > > psexec \\%SERVERIP% route print >> %SERVERNAME%-routeprint.txt > psexec \\%SERVERIP% tracert foo.com >> %SERVERNAME%-Tracert.txt > psexec \\%SERVERIP% netstat -an >> %SERVERNAME%-netstat.txt > SRVINFO -NF \\%SERVERIP% |FIND /I "foo" >> %SERVERNAME%- > ServiceStatus.tx > > When I add a line to telnet to a remote DNS to an specific port, the > output file is always empty, whether it connects or fails. > > the best case scenario would be that I at least get a text output for > a fail. I don't care about a success, since the resulting screen > would be blank anyways. > > As it is now, I have to connect to all the servers manually via RDP > and telnet then copy/paste into a text file. > > It wouldn't be so bad if I didn't have about 60 servers to check. > > any input? I don't think that you can do this with telnet.exe. Try nc.exe instead - it's much more versatile: http://www.securityfocus.com/data/tools/nc11nt.zip
Recommended Posts