I'm wanting to export the zone file at my old DNS registrar, so I can then easily rekey the info into my new registrar. When I spoke to their support people, they said I have to manually retype it, but given I've got dozens of records, I would prefer not to. I tried to use dnscmd but got error "RPC_S_SERVER_UNAVAILABLE 1722 0x6BA".
Dnscmd only runs against a local Microsoft DNS server. If your registrar doesn't provide an export mechanism, then there's not really anything you can do programmatically. You can _try_ running Nslookup and pulling all the records from the zone, but they may disallow that.