telnet is not recognized as an internal or external command, How to enable it?

telnet is not recognized Windows Server 2016

In this article, we will learn how to enable telnet in Windows Server 2016 and Windows Server 2019 to fix “telnet is not recognized as an internal or external command, operable program or batch file.

‘telnet’ is not recognized as an internal or external command, operable program or batch file

You might also like to How to Check SQL Server Connectivity between Application Server and Database Server.


telnet is not recognized as an internal or external command,

When I tried to check the connectivity between two servers from SharePoint Server to Exchange server on port 25 using telnet command, I got the below error.

telnet is not recognized as an internal or external command, operable program or batch file.

telnet is not recognized Windows Server 2016

Why the telnet is not recognized Windows Server 2016?

Actually, we got the “telnet is not recognized as an internal or external command” error because the Telnet Client feature is not installed on the Windows Server 2016.

Enable telnet Windows Server 2016

How to Enable Telnet Client in Windows Server 2016?

Before we get started to fix the “telnet is not recognized” issue, let us first define What’s Telnet Client?

What’s Telnet Client?

The telnet stands for “Telecommunication network“, it’s a network protocol that used to access a remote computer over the TCP/IP network or over the internet.

As administrators, we mostly use the Telnet command to check the connectivity between two servers within the same network, we specifically check the port status (Opened or closed) on the destination server. so if the port is opened, the source server can connect to the destination server. Read more at Microsoft Docs.

So that, to install and enable Telnet Client feature in Windows Server 2016 / 2012, you should follow the below steps:

Steps

  1. Open Server Manager > Manage > Add Roles and Features.
Add role and feature in Windows Server 2016
  1.  Continue clicking on Next button until reaching to Features section.
telnet is not recognized as an internal or external command, operable program or batch file.
  1. Scroll down to finding Telnet Client > Check it.
How to Enable Telnet Client in Windows Server 2016?
  1. Click Next > Click Install.
Install telnet Windows Server 2016
  1. Wait a moment until the feature installation has finished > Click close.
Telnet Feature installation complete

Verity and Test Telnet Client

To make sure that the Telnet Client feature has been enabled and installed properly in Windows Server 2016 / 2012, you should do the following:

Steps

  1. Open the command prompt as administrator > Type the following Telnet command.
telnet [Exchange Server FQDN or IP] [Port] Ex: telnet dc 25
  1. If the port is opened, you should get the below message that means SharePoint Server can connect to the SMTP server on port 25
the port is opened using telnet cmdlet

You might also like to read Exit Telnet Session

  1. Otherwise, you will get the below message that means the specified port is closed, and you could not open connection to the host.
the port is closed using telnet, connect failed

In this case, you should check with your Security/Network administrator the below points:

  1. What’s the IP or FQDN for SMTP Server?
  2. What’s the assigned port for the SMTP server? (the default port is 25).
  3. On your server, the ports might be blocked by a firewall or antivirus settings. thence, you should redefine the inbound and outbound rules related to SMTP.

How to Enable Telnet using PowerShell?

Besides, enabling Telnet Client through Server Manager, you can easily and quickly install a new windows feature through PowerShell by doing the following:

Steps

  1. Open Windows PowerShell as Administrator.
Run Windows PowerShell as Administrator
  1. Run the below command line
Install-WindowsFeature -name Telnet-Client
how to enable telnet windows server 2016 powershell

How to install Telnet Client Online using Command-Line?

To install Telnet Client windows feature, you can also use command line as the following:

  1. Open Command Prompt as Administrator.
  2. Run the below command line to install Telnet Client Online.
dism /online /Enable-Feature /FeatureName:TelnetClient

You might also like to read how to Install .NET Framework 3.5 on Windows Server 2016


Conclusion

To be able to use the Telnet command line, and avoid “telnet is not recognized as an internal or external command, operable program or batch file“. you must first install Telnet Client as a feature in Windows Server.

Here, we have learned, how to enable telnet client feature in Windows Server 2016 and 2012 through Server Manager, PowerShell, and CMD.

Applies To
  • Windows Server 2019.
  • Windows Server 2016.
  • Windows Server 2012.
  • Windows Server 2008.
You might also like to read

3 thoughts on “telnet is not recognized as an internal or external command, How to enable it?”

  1. Pingback: Workflow Manager: Port is blocked | SPGeeks

  2. I havee been surfing online mⲟre than three һoսrs today, yet Ӏ never
    foսnd any interesting article lіke yourѕ. Ӏt
    is pretty worth enough fօr me. Personally, іf аll web owners and bpoggers mɑde ɡood ϲontent
    as you did, the net ԝill Ьe a lot more ᥙseful thаn ever befοrе.

  3. It’s a pity you don’t have a donate button! I’d certainly donate to this superb blog!
    I suppose for now i’ll settle for bookmarking and adding
    your RSS feed to my Google account. I look forward to fresh updates and will talk about this blog with my Facebook group.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top