none
Adding NAPTR record to the Zone RRS feed

  • Question

  • Hi,

    I am trying to add NAPTR record on  the Microsoft server. When I do it using the user interface, it asks for order, preference, flag string, service string etc. But when I try to add using powershell using command like below it is not asking for these values.

    Add-DnsServerResourceRecord -ZoneName beats.com -SERVICE naptr -Name arecord -InternetAddress 192.168.0.1 -InternetProtocol UDP -Wks 

    Add-DnsServerResourceRecord : Failed to create resource record arecord in zone beats.com on server WIN-O24OMMU47LH.
    At line:1 char:1
    + Add-DnsServerResourceRecord -ZoneName localzone.com -SERVICE naptr -Name arecord -In ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidData: (arecord:root/Microsoft/...rResourceRecord) [Add-DnsServerResourceRecord],
       CimException
        + FullyQualifiedErrorId : WIN32 13,Add-DnsServerResourceRecord

    Can anyone help me how to create a NAPTR record using powershell commands? 

    Thanks,

    Kiran


    • Moved by jrv Tuesday, January 22, 2019 7:19 AM Best forum
    Tuesday, January 22, 2019 7:03 AM

All replies

  • Hello TejaShetty,

    The NAPTR record is very different from the general resource record.

    When you want to create a correct NAPTR record, you need to enter more details in that dialog.

    when I try to add using powershell using command like below it is not asking for these values

    Compare the way we register A records with powershell. If you don't configure those values, I don't think you can create a usable NAPTR record.

    I read some documentation and consulted other engineers, but still don't know how to use powershell to register NAPTR records.

    BTW, if you want to register it with the user interface, I suggest you refer to the article on this page.

    Best Regards,

    Leon


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, January 23, 2019 8:17 AM
  • Hi Leon,

    Thanks for the reply and the detailed document.

    I need to create records remotely using powershell commands. Using WinRM I am trying to do this. In case of NAPTR record I am facing this issue.

    Thanks and Regards,

    Teja


    • Edited by TejaShetty Wednesday, January 23, 2019 11:42 AM
    Wednesday, January 23, 2019 11:40 AM
  • You are welcome, Teja.

    Sorry for not providing effective help. I will keep this post here. Maybe someone knows how to use powershell to add NAPTR records.

    I will also consult the powershell engineers, and I will let you know once there is an update.

    Best Regards,

    Leon


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, January 25, 2019 2:04 AM