dnslookup.dll Error in Windows 10 and 11: Fix Resolve-DnsName

If Windows PowerShell reports that it cannot load dnslookup.dll when you run Resolve-DnsName, first check whether you have a PowerShell module problem or a DNS problem. The quickest way to tell is to query the same hostname with Windows’ built-in nslookup command.
What dnslookup.dll does
dnslookup.dll is associated with the Windows PowerShell DnsClient module, which provides Resolve-DnsName. A load or module-import error can prevent the cmdlet from sending a DNS query at all. A normal DNS error such as a timeout or a name that does not exist means the cmdlet got far enough to attempt the lookup. Those symptoms point to different fixes.
Compare the same query in both tools
Open Windows PowerShell from Start. For this check, use the Windows PowerShell app even if you normally run PowerShell 7, which can import Windows modules differently. A standard session is enough. Type the commands separately and record the first error, including the file path or module name if one appears.
Resolve-DnsName -Name www.microsoft.com -Type A -DnsOnly
nslookup -type=A www.microsoft.com
On a restricted work network, substitute a known hostname that your IT team expects the assigned DNS server to resolve. Compare whether each tool returns a record or errors. Exact IP addresses can differ for large public sites.
If both tools return records, repeat the test with the original hostname and the same network connection. If the original name alone fails, check its spelling, VPN requirement, and whether it is an internal domain. If the command works in Windows PowerShell but a script still fails elsewhere, record which PowerShell executable runs the script.
If only Resolve-DnsName fails with a DLL or module load error, open a clean Windows PowerShell session from the Run dialog with powershell.exe -NoProfile and repeat the same lookup. If the clean session works, check the original session for a conflicting profile, command, or module path. The following read-only check shows where the available copies of the DnsClient module are located.
Get-Module -ListAvailable DnsClient | Select-Object Name, Version, Path
If both tools fail to resolve a known-good name, check the active network or VPN and try another approved hostname. If another device on the same network also fails, give your network administrator the exact hostname, DNS error, and time. Keep the managed DNS settings in place while you diagnose the issue.
Repair Windows files if the load error persists
If a clean Windows PowerShell session still reports a missing or damaged DLL from the built-in module, check Windows Update for applicable fixes and restart. If the load error persists, open Command Prompt as administrator. Run the first command, wait for it to finish successfully, then run the second.
DISM.exe /Online /Cleanup-image /Restorehealth
sfc /scannow
Record the result of each scan. If DISM reports that source files are unavailable, or SFC says it could not repair all files, record the error code and follow the Windows system-file repair guide. On a managed computer, give that information to IT before making further system changes. Keep Windows’ built-in module files together and avoid downloading or registering a loose copy of dnslookup.dll.
Verify the original lookup
Open a new Windows PowerShell window. Run the known-good lookup again, then run the exact command or script that first reported the error, using the original network or VPN. A successful fix means the original command now returns the expected DNS record and the DLL error no longer appears. If the DLL error is gone but the original hostname still fails, continue with DNS troubleshooting for that name.
References
Microsoft Learn’s Resolve-DnsName command reference · Microsoft’s DnsClient cmdlet help source · Microsoft’s System File Checker instructions · PC Repair Atlas DLL Library