Resolve-DnsName is the PowerShell version of NSLookup. PowerShell commands are very powerful and feature-rich compared to the classic cmdlet commands. This is also common to the PowerShell equivalent of NSLookup. I will not discuss the command in detail but I will show you the most useful commands to get you going.
Simply to find all general IP records for a domain you can use,
Resolve-DnsName www.domain.com
of course to find the hostname you can use the IP address instead,
Resolve-DnsName 8.8.8.8
You can filter or extend query results using many parameters.
Let’s say you need to see all NS records for a particular domain for this we can use –Type parameter,
Resolve-DnsName www.randika.info -Type NS
Here are some common record types you can use with -Type.
In case you want to retrieve information from a particular DNS server you can use –Server parameter,
Resolve-DnsName www.randika.info -Server 8.8.8.8
You can also test the resolution strictly using the DNS protocol or using your computer’s Local DNS cache. This is really useful when testing partial DNS availabilities, DNS cache troubleshooting etc.
– To only use DNS protocol for the resolution,
Resolve-DnsName www.randika.info –DnsOnly
– To only use the client’s DNS Cache for the resolution
Resolve-DnsName www.randika.info -CacheOnly
Bonus: You can view the whole DNS cache table on your computer using the following PowerShell command.
Get-DnsClientCache
Hope this was helpful!
Creating an engaging and informative online quiz or assessment can be a powerful tool for… Read More
Work-related stress is a common issue in the hospitality industry, where employees often face long… Read More
In a leadership position, assertiveness and effective communication skills are crucial for success. Being able… Read More
Employee recognition and rewards programs play a crucial role in motivating and engaging employees, as… Read More
Customer feedback and online reviews play a crucial role in shaping a company's reputation and… Read More
Effective time management is crucial for stay-at-home parents who juggle multiple responsibilities on a daily… Read More