About PowerShell and tnc
PowerShell is a task-based command-line shell and scripting language included with all currently supported versions of Windows. tnc is a PowerShell command that displays diagnostic information for a connection. To launch PowerShell, press the Windows key on the keyboard and begin typing PowerShell until the PowerShell Desktop Application option is visible. Click on the PowerShell Desktop Application icon to launch PowerShell.Using PowerShell and tnc to troubleshoot
To use tnc to test basic network connectivity, you need to know two things:- The remote server name or IP address.
- The port number for the network application you want to test.
tnc IP/host -port port, where IP/host represents the IP address or hostname of the server, and port represents the TCP port number. For example, to test to example.com on port 80, type the following command:
- The server accepts the connection. If this happens, tnc will report TcpTestSucceeded: True.
- The server rejects the connection. If this happens, tnc will report TcpTestSucceeded: False.
Troubleshooting web servers
Web server testing is probably the most common scenario for network troubleshooting. With tnc you can test a connection to a remote server on port 80. The following text shows the tnc test:Troubleshooting mail (SMTP) servers
To test an SMTP server, use tnc to connect to port 25. If you are testing connectivity to a hosting.com mail server, you can also use port 2525 or 587. Some ISPs block port 25 to help reduce spam on their networks. The following text shows the tnc test of a remote mail server:Troubleshooting FTP
To test an FTP server, use tnc to test port 21. The following text shows the tnc test of a remote FTP server:Troubleshooting SSH
SSH uses encrypted connections. However, you can still use tnc to verify that the service is running on a server. The following text shows the tnc test of a remote SSH server:Make sure you use the correct SSH port number for your account. For example, some hosting accounts use a different port for SSH, such as 7822.