Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to test Telnet connectivity

14 views
Skip to first unread message

IT Staff

unread,
Nov 25, 2009, 3:27:06 AM11/25/09
to
A) PS2.0 installed on MY XP.

b) i've a list of SERVERS with telnet service turn on.

c) i've only one exchange relay server, let's call it relay_server. Telnet
service is turn on too.

Objective

1. I wish to check whether the list of SERVERS can telnet to relay_server
port 25 (telnet relay_server 25).

What is the best way to do this ? telnet may reply with multiple msg if
successful and if not successful, what msg should i capture ?

Martin Zugec

unread,
Nov 25, 2009, 3:46:13 PM11/25/09
to
Hi,

can you use v2 remoting together with following?
http://www.leeholmes.com/blog/ReplacingTelnetexeNowRemovedFromVista.aspx

Martin

"IT Staff" <jkk...@hotmail.com> wrote in message
news:#LG7Ukab...@TK2MSFTNGP02.phx.gbl...

Rob Campbell

unread,
Nov 27, 2009, 10:47:01 AM11/27/09
to
Here's a simple test-port.


function Test-Port{
Param([string]$srv,$port=5001,$timeout=1000,[switch]$verbose)
$ErrorActionPreference = "SilentlyContinue"
$tcpclient = new-Object system.Net.Sockets.TcpClient
$iar = $tcpclient.BeginConnect($srv,$port,$null,$null)
$wait = $iar.AsyncWaitHandle.WaitOne($timeout,$false)
if(!$wait)
{
$tcpclient.Close()
if($verbose){Write-Host "Connection Timeout"}
Return $false
}
else
{
$error.Clear()
$tcpclient.EndConnect($iar) | out-Null
if($error[0]){if($verbose){write-host $error[0]};$failed = $true}
$tcpclient.Close()
}
if($failed){return $false}else{return $true}
}


"IT Staff" wrote:

> .
>

0 new messages