Test-NetConnection
In the absence of Nmap on a Windows PC, Test-NetConnection can serve as an alternative
Test-NetConnection
is a PowerShell cmdlet in Windows that enables network-related testing and diagnostics. It allows users to check connectivity, test ports, and perform various network-related tasks directly from the PowerShell command line.
Test-NetConnection
is a PowerShell cmdlet in Windows that enables network-related testing and diagnostics. It allows users to check connectivity, test ports, and perform various network-related tasks directly from the PowerShell command line.Usage:
Key Parameters:
-ComputerName
: Specifies the target host or IP address to test connectivity.-Port
: Specifies the target port number to test. If not provided, a default port is used.-InformationLevel
: Specifies the level of detail in the output.
Common Scenarios:
Basic Connectivity Test:
Performs a basic connectivity test to the specified host.
Port Test:
Tests connectivity to a specific port on the target host.
Detailed Output:
Provides detailed information about the connection, including source and destination IP addresses.
Examples:
Basic connectivity test to example.com:
Test connectivity to port 80 on example.com:
Detailed output for port 443 on example.com:
Resources:
Last updated