How to add NS record (DNS resource record) to Domain Controller using DnsModifyRecordsInSet_A API ?

Khoa Tran 0 Reputation points
2023-02-13T04:56:10.8+00:00

Hi Team,

We are implementing a feature that allows adding DNS resource records remotely to Domain Controller, and we found the following API DnsModifyRecordsInSet_A to perform this action, currently, this API can add most DNS records except NS one. And we have to perform dnscmd in order to add NS record, could we do this action using API? If yes, could you please share with me which API should I use to do it? Thanks in advance

https://learn.microsoft.com/en-us/windows/win32/api/windns/nf-windns-dnsmodifyrecordsinset_a

Thanks

Khoa Tran

Windows development | Windows API - Win32
Windows for business | Windows Server | User experience | Other
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 44,776 Reputation points
    2023-02-13T16:59:45.3833333+00:00

    Hello there,

    Updating a single existing NS Record using the API requires specific syntax depending on whether you are using REST or SOAP.

    /REST/NSRecord/ POST — Create a new NS Record on the zone/node indicated.

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer–

    0 comments No comments

  2. Khoa Tran 0 Reputation points
    2023-02-14T04:18:38.0466667+00:00

    Hi,

    We don't use REST or SOAP to add DNS records, there is SDK as the link below that provides functions to add these records except NS. Can you clarify more about your suggestion? Thanks in advance.

    https://learn.microsoft.com/en-us/windows/win32/api/windns/nf-windns-dnsmodifyrecordsinset_a

    Thanks

    Khoa Tran

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.