Error: Get-DnsServerTrustAnchor : The remote procedure call failed. Microsoft DNS

In this post, I describe how to fix the error: Get-DnsServerTrustAnchor : The remote procedure call failed. Cause This error can occur when you try to get the DNS server trust anchor for a trust point with an invalid public key. This can occur in PowerShell or when scanning DNS using the IT documentation tool XIA Configuration Server. Resolution To fix this error, delete the DNS trust point with the invalid public key then recreate it with a valid key. Get-DnsServerTrustAnchor should now run without an error.