This article help you check basic network connectivity issues by using PowerShell cmdlets. It provides some network troubleshooting tools for checking network connectivity and configuration.
Install Windows® PowerShell®.
Review the following guidance on PowerShell cmdlets syntax to understand user expectations for cmdlets:
- PowerShell is not case sensitive.
- Cmdlets always use a verb-noun structure. This helps you understand the function of a given command.
- You can modify cmdlet output with parameters.
- Parameter names always start with a dash like -name, -object, or -list.
- The followimg comand return usage help:
Get-Help <command name> -Full.
Use the following cmdlets to troubleshoot network issues:
This cmdlet lists all network adapters. For example:
Get-NetAdapter -Name "Ethernet".
-Name argument filters for a specific network adapter in the output. In this case, the cmdlet searches for an Ethernet adapter. You can add wildcards to the beginning and end of argument criteria to further specify your search.
This cmdlet tests network connectivity to another computer. For example:
Test-NetConnection -ComputerName "Hostname or IP address".
You should use the hostname when testing network connectivity. If you get a Host not Found error, try the command again using the IP address of the destination. If it returns successfully, there might be an issue with DNS resolution.
This cmdlet tests network connectivity to a specific port on a computer.
Test-NetConnection -ComputerName "Hostname or IP address" -Port #.
This cmdlet gets a DNS server address.
Get-NetAdapter -Name "Local Area Connection".
This cmdlet gets the DNS Server for a remote host or IP address.
Resolve-DnsName "Hostname or IP".
This cmdlet returns the route table for all interfaces.
These cmdlets enable or diable a network interface.
Disable-NetAdapter -Name "Adapter Name" and
Enable-NetAdapter -Name "Adapter Name".
This cmdlet returns IP address configuration details.
Use the Feedback tab to make any comments or ask questions. You can also start a conversation with us.
Updated 22 days ago