How to troubleshoot name resolution

Step one

Step two

The Test-NetConnection cmdlet

# Testing simple Ping test 
# Testing TCP port with defined Port number 
Test-NetConnection -Port 443
Test-NetConnection -CommonTCPPort RDP
Test-NetConnection -TraceRoute

Step three

Step four

# The file cannot be edited without administrator privileges 
notepad C:\Windows\System32\Drivers\Etc\Hosts

Step five

A common thing to do when troubleshooting name resolution, is forget that you’ve edited the hosts-file for testing and you can’t seem to understand why it won’t update or answers with wrong response.

NOTE: The Get-DnsClientCache | Format-List cmdlet is used to make the list more readable by formatting the result as a list instead of table format.

Step six

## Resolves information using default option 
## Queries for information about the name server for Resolve-DnsName -Name -Type NS | Format-List ## Queries for canonical names
Resolve-DnsName -Name -Type CNAME | Format-List
## Queries for type A (IPv4 server addresses) records
Resolve-DnsName -Name -Type A | Format-List
## Queries for mail routing records
Resolve-DnsName -Name -Type MX | Format-List
## Queries for ANY and ALL records, these are wildcard match. Resolve-DnsName -Name -Type ANY | Format-List Resolve-DnsName -Name -Type All | Format-List ## Resolves information against the DNS server on Cloudflare Resolve-DnsName -Name -Server | Format-List



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store