By default, Telnet is not installed on Windows or Windows Server. In order to use Telnet, the Telnet client has to be installed. In Windows, this can be done through Control Panel > Programs and Features > Turn Windows features on or off, and check the Telnet Client. For Windows Server, go to Server Manager > Features > Add Features > Telnet Client.
Or add the Telnet Client feature through PowerShell,
1 2 | Import -Module ServerManager Add -WindowsFeature -Name Telnet -Client |
To test TCP port,
1 2 | $tcp = New-Object System.Net.Sockets.TcpClient $tcp .connect( '<remote server>' , <port>) |
1 | ( New-Object System.Net.Sockets.TcpClient).Connect( '<remote server>' , <port>) |
Starting in Windows Server 2012 R2, Microsoft includes Test-NetConnection in NetTCPIP Module. This command could be used to simulate the traditional ping, tracert, and testing TCP connectivity.
1 2 3 4 5 6 7 8 | # ping Test -NetConnection -ComputerName <remote server> # tcp test on a port Test -NetConnection -ComputerName <remote server> -Port <port> # tracert Test -NetConnection -ComputerName <remote server> -TraceRoute |
No comments:
Post a Comment