This script will assist in moving from unbound DNS on pfSense to Windows Server DNS. It parses the backup XML pfSense creates and creates A and CNAME records in the windows DNS zone. Steps:
- backup pfSense config to XML.
- prep zone on windows server (if new)
- run script into memory, call function Import-pfSUnDNS
see example in comments
Once complete, you can remove all unbound DNS records and redirect/stub to windows DNS servers, or update hosts DNS servers.