Various options to enable the Telnet client and other methods to check the port.

In recent version of windows, Telnet Client is not enabled by default and in this blog we can see various method to install the client and to check the port connectivity.

Option 1 :

we can install it from the Add Roles and Feature.

Telnet

Option 2:

Apart from this tradition way, we can install it using the below Power shell method.

Import-Module ServerManager
Add-WindowsFeature -Name Telnet-Client

Option 3:

dism /online /Enable-Feature /FeatureName:TelnetClient

Telnet1

Option 4:

Download the below Powershell script and run it on the server.

Dropbox

Option 5:

We can install telnet client using the package manager.

Pls note it will support only Windows Vista & higher.

c:>pkgmgr /iu:”TelnetClient”

Next we can see options to test the port from the source system to destination without using telnet.

Option 1:

On windows to test the port from the source system to destination we can use alternate method without installing the Telnet client is by Windows Sockets using the System.Net.Sockets provided in .NET framework.

New-object System.Net.Sockets.TcpClient(“IP”,”PORT”)

telnetd

Option 2:

Use the below powershell script which can do the same operations.

Dropbox

Option 3:

To make it easy we can import this function as cmdlet or module and then use it as the easy powershell cmdlet to test port.

Import-module Test-port.psm1

Type get-help Test-port
syntax Test-port [[-computername] <Object>] [[-port] <Object>]

Test-port -computername 1.1.1.1 -port 80

Download it from the Dropbox and get more info from the readme.

Option 4:

In VMware Vcenter appliance we have to use the CURL to test the  port connectivity.

KB2097039 will give more info on the same.

curl -v telnet://127.0.0.1:22

Option 5:

Telnet is available only on ESX hosts. For ESXi 3.5, 4.x and 5.x, you will need to use the netcat (nc).

KB 2020669 will give more info on the same.

nc -z <destination-ip> <destination-port>

Reference :

http://powershell.com/cs/blogs/tips/archive/2016/01/26/enabling-telnet-client-and-watching-star-wars.aspx?utm_content=buffer46e94&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer

https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2097039

https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2020669

http://www.travisgan.com/2014/03/use-powershell-to-test-port.html

 

Advertisement
This entry was posted in ESX command, ESXi Tools, Powershell, VMware, Windows and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s