Documentation
Install DnsClientX
Install DnsClientX for PowerShell or .NET.
Install the PowerShell module:
Install-Module -Name DnsClientX -Scope CurrentUser
Import-Module DnsClientX
Use the .NET library from NuGet:
dotnet add package DnsClientX
The PowerShell module is the quickest way to test resolver behavior interactively. The .NET package is the better fit when DNS queries are part of an application or service.