Archive

Archive for the ‘Powershell’ Category

Goodby Telnet

October 22, 2016 Leave a comment

Telnet has been a feature that has been intentionally removed by default from all Windows OS for the last 4 years as a result of the security concerns, and the PowerShell CMDLet “Test-NetConnection” with the -port parameter is the new tool for testing port status.

10-22-2016-7-35-03-pm

Examples

Example 1: Test ping connectivity

This command tests ping connectivity to a default server.

PS C:\>  Test-NetConnection

Example 2: Test ping connectivity with detailed results

This command tests ping connectivity to a default server and sets the InformationLevel parameter to Detailed.

PS C:\>  Test-NetConnection -InformationLevel "Detailed"

Example 3: Test TCP connectivity and display detailed results

This command tests TCP connectivity to a default server and sets the InformationLevel parameter to Detailed.

PS C:\>  Test-NetConnection -Port 80 -InformationLevel "Detailed"

Example 4: Test a connection to a remote host

This command tests ping connectivity to a remote host named http://www.contoso.com.

PS C:\>  Test-NetConnection -ComputerName "www.contoso.com" -InformationLevel "Detailed"

Example 5: Perform route diagnostics to connect to a remote host

This command performs route diagnostics to reach a remote host named http://www.contoso.com.

PS C:\>  Test-NetConnection -ComputerName www.contoso.com -DiagnoseRouting -InformationLevel Detailed

Example 6: Perform route diagnostics to connect to a remote host with routing constraints

This command performs route diagnostics to reach a remote host named http://www.contoso.com with routing constraints.

PS C:\>  Test-NetConnection -ComputerName "www.contoso.com" -ConstrainInterface 5 -DiagnoseRouting -Info
Advertisements
Categories: Powershell