When you run the Test-NetConnection command on a Windows PC and provide only a host name, the command defaults to performing a basic network connectivity test to the given host.
Here's what happens step-by-step:
Ping Test: By default, Test-NetConnection will attempt a ping to the specified host. Ping is a network utility that checks if a host is reachable across an IP network and measures the round-trip time for messages sent from the originating host to a destination computer.
DNS Resolution: The command will resolve the host name to an IP address using DNS (Domain Name System).
Output: The result will show you detailed information like the host address, whether it was able to ping the host, the response delay (round-trip time), and the IP address that was contacted.
Test-NetConnection is a powerful command that can show more detailed results compared to the traditional ping utility by providing additional related data like the remote IP address and delay time information, which may help you diagnose network connectivity issues.
This command is especially useful for administrators or users looking to understand potential network problems or test network availability to a host in a straightforward way.