<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic PSTK: Remove-NcNetDns missing in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/PSTK-Remove-NcNetDns-missing/m-p/155602#M3026</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I notice that there is Get-NcNetDns and Set-NcNetDns (to get the list of DNS servers, and to change the DNS servers), but there is no corresponding Remove-NcNetDns to remove the DNS config from an SVM or the Cluster.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would it be possible to add that commandlet to the next version of PSTK? Currently we're relying on Invoke-NcSSH for that, and that has some other quirks that make it undesirable&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;-Michael&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jun 2025 11:12:51 GMT</pubDate>
    <dc:creator>Darkstar</dc:creator>
    <dc:date>2025-06-04T11:12:51Z</dc:date>
    <item>
      <title>PSTK: Remove-NcNetDns missing</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/PSTK-Remove-NcNetDns-missing/m-p/155602#M3026</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I notice that there is Get-NcNetDns and Set-NcNetDns (to get the list of DNS servers, and to change the DNS servers), but there is no corresponding Remove-NcNetDns to remove the DNS config from an SVM or the Cluster.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would it be possible to add that commandlet to the next version of PSTK? Currently we're relying on Invoke-NcSSH for that, and that has some other quirks that make it undesirable&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;-Michael&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 11:12:51 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/PSTK-Remove-NcNetDns-missing/m-p/155602#M3026</guid>
      <dc:creator>Darkstar</dc:creator>
      <dc:date>2025-06-04T11:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: PSTK: Remove-NcNetDns missing</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/PSTK-Remove-NcNetDns-missing/m-p/155617#M3027</link>
      <description>&lt;P&gt;You can actually use the "Set-NcNetDns" command to remove DNS servers from the configuration by just using empty double quotes for the NameServers parameter. (code snippet from the output of the "Get-Help Set-NcNetDns -Examples command"):&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;    --------------  Example 3 --------------

    C:\PS&amp;gt;Set-NcNetDns -NameServers ""

    Remove the name server list from the DNS configuration of the current vserver.&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 15:29:24 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/PSTK-Remove-NcNetDns-missing/m-p/155617#M3027</guid>
      <dc:creator>donny_lang</dc:creator>
      <dc:date>2020-04-17T15:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: PSTK: Remove-NcNetDns missing</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/PSTK-Remove-NcNetDns-missing/m-p/155622#M3028</link>
      <description>&lt;P&gt;Did you actually try that command? Because it was the first thing I tried, and it doesn't work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;PS C:\&amp;gt; set-ncnetdns -vserver ClusterF -NameServers ""
set-ncnetdns : Invalid value specified with "-name-servers". Specify a valid IP address.
At line:1 char:1
+ set-ncnetdns -vserver ClusterF -NameServers ""
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (10.91.81.206:NcController) [Set-NcNetDns], EAPIERROR
    + FullyQualifiedErrorId : ApiException,DataONTAP.C.PowerShell.SDK.Cmdlets.Net.SetNcNetDns&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 18:00:31 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/PSTK-Remove-NcNetDns-missing/m-p/155622#M3028</guid>
      <dc:creator>Darkstar</dc:creator>
      <dc:date>2020-04-17T18:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: PSTK: Remove-NcNetDns missing</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/PSTK-Remove-NcNetDns-missing/m-p/155625#M3029</link>
      <description>&lt;P&gt;Dang, that's what I get for assuming that a cmdlet will work according to its documentation! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like there's a discrepancy between what the cmdlet itself accepts for the NameServers parameter and what the "name-servers" parameter in ZAPI accepts.&amp;nbsp; From the de-compiled Set-NcNetDns cmdlet:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[Parameter(HelpMessage = "Addresses of name servers such as '123.123.123.123'.", Position = 1, ValueFromPipelineByPropertyName = true)]
    [AllowNull]
    [AllowEmptyCollection]
    [Alias(new string[] {"Servers"})]
    public string[] NameServers { get; set; }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;And the ZAPI:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;netapp  xmlns="http://www.netapp.com/filer/admin" version="1.160"&amp;gt;
  &amp;lt;net-dns-modify&amp;gt;
    &amp;lt;attempts&amp;gt;&amp;lt;/attempts&amp;gt;
    &amp;lt;dns-state&amp;gt;&amp;lt;/dns-state&amp;gt;
    &amp;lt;domains&amp;gt;&amp;lt;/domains&amp;gt;
    &amp;lt;is-tld-query-enabled&amp;gt;&amp;lt;/is-tld-query-enabled&amp;gt;
    &amp;lt;name-servers&amp;gt;
      &amp;lt;ip-address&amp;gt;&amp;lt;/ip-address&amp;gt;
    &amp;lt;/name-servers&amp;gt;
    &amp;lt;require-packet-query-match&amp;gt;&amp;lt;/require-packet-query-match&amp;gt;
    &amp;lt;require-source-address-match&amp;gt;&amp;lt;/require-source-address-match&amp;gt;
    &amp;lt;skip-config-validation&amp;gt;&amp;lt;/skip-config-validation&amp;gt;
    &amp;lt;timeout&amp;gt;&amp;lt;/timeout&amp;gt;
  &amp;lt;/net-dns-modify&amp;gt;
&amp;lt;/netapp&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;PS C:\users\donny.lang\desktop&amp;gt; $Request = @"
&amp;gt;&amp;gt;
&amp;gt;&amp;gt;   &amp;lt;net-dns-modify&amp;gt;
&amp;gt;&amp;gt;     &amp;lt;name-servers&amp;gt;
&amp;gt;&amp;gt;       &amp;lt;ip-address&amp;gt;""&amp;lt;/ip-address&amp;gt;
&amp;gt;&amp;gt;     &amp;lt;/name-servers&amp;gt;
&amp;gt;&amp;gt;   &amp;lt;/net-dns-modify&amp;gt;
&amp;gt;&amp;gt; "
PS C:\users\donny.lang\desktop&amp;gt; Invoke-NcSystemApi -Request $Request -VserverContext lab-svm-01
Invoke-NcSystemApi : Invalid value specified for "name-servers" element within "net-dns-modify": """".
At line:1 char:1
+ Invoke-NcSystemApi -Request $Request -VserverContext lab-svm-01
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (10.250.63.175:NcController) [Invoke-NcSystemApi], EINVALIDINPUTERROR
    + FullyQualifiedErrorId : ApiException,DataONTAP.C.PowerShell.SDK.Cmdlets.System.InvokeNcSystemApi&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;I wonder if it worked in an older version of the API and was removed/changed for some reason.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 19:29:44 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/PSTK-Remove-NcNetDns-missing/m-p/155625#M3029</guid>
      <dc:creator>donny_lang</dc:creator>
      <dc:date>2020-04-17T19:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: PSTK: Remove-NcNetDns missing</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/PSTK-Remove-NcNetDns-missing/m-p/166266#M3132</link>
      <description>&lt;P&gt;The"" will not in Ontap 9. It use to work in Data Ontap 8.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;::*&amp;gt; dns modify -vserver vs1 -domains domain.local -name-servers "" 
Error: command failed: Invalid value specified with "-name-servers". Specify a
       valid IP address.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 09:35:21 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/PSTK-Remove-NcNetDns-missing/m-p/166266#M3132</guid>
      <dc:creator>Mjizzini</dc:creator>
      <dc:date>2021-04-23T09:35:21Z</dc:date>
    </item>
  </channel>
</rss>

