<?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 Re: Differences between executing powershell toolkit command in WFA and in powershell CLI in Active IQ Unified Manager Discussions</title>
    <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Differences-between-executing-powershell-toolkit-command-in-WFA-and-in/m-p/114723#M20393</link>
    <description>&lt;P&gt;The reason for this error is that -AllowAddess accepts an array if strings. Look at the Get-Help syntax of the cmdlet&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS H:\&amp;gt; Get-help New-NcNetFirewallPolicy&lt;/P&gt;&lt;P&gt;NAME&lt;BR /&gt;New-NcNetFirewallPolicy&lt;BR /&gt;&lt;BR /&gt;SYNOPSIS&lt;BR /&gt;Create a new firewall policy.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SYNTAX&lt;BR /&gt;New-NcNetFirewallPolicy [-Name] &amp;lt;String&amp;gt; [-Vserver] &amp;lt;String&amp;gt; [-Service] &amp;lt;String&amp;gt; &lt;FONT color="#0000FF"&gt;[-AllowAddress] &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&amp;lt;String[]&amp;gt;&lt;/FONT&gt; [-Controller &amp;lt;NcController[]&amp;gt;] [-ZapiRetryCount &amp;lt;Int32&amp;gt;] [&amp;lt;CommonParameters&amp;gt;]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;DESCRIPTION&lt;BR /&gt;Create a new firewall policy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So when you put the AllowAddress i quotes, they are treated as a string. When you put nothing, Powershell can ideantify the comma seperated values as an array of strings.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could have used&lt;/P&gt;&lt;P&gt;====&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$allowAddress= @("1.1.1.1/32","1.1.1.1/32")&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;New-NcNetFirewallPolicy -Vserver vs1 -Name test3 -Service dns -AllowAddress $allowAddress&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;===&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And there is NO difference between running a cmdlet in Powershell console CLI or in WFA comamnd except the latter runs in non-ineractive mode. That's all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sinhaa&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Jan 2016 09:21:33 GMT</pubDate>
    <dc:creator>sinhaa</dc:creator>
    <dc:date>2016-01-18T09:21:33Z</dc:date>
    <item>
      <title>Differences between executing powershell toolkit command in WFA and in powershell CLI</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Differences-between-executing-powershell-toolkit-command-in-WFA-and-in/m-p/114685#M20367</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when I execute the following command at powershell CLI it runs without problems:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;new-ncnetfirewallpolicy -vserver vs0 -Name test1 -Service dns -AllowAddress 1.1.1.1/32,1.1.1.2/32&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I execute this command within a WFA command it returns the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Invalid value specified for "allow-list" element within "net-firewall-policy-create": "1.1.1.1/32,1.1.1.2/32"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me with this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Walter&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 22:18:49 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Differences-between-executing-powershell-toolkit-command-in-WFA-and-in/m-p/114685#M20367</guid>
      <dc:creator>kiessl</dc:creator>
      <dc:date>2025-06-04T22:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Differences between executing powershell toolkit command in WFA and in powershell CLI</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Differences-between-executing-powershell-toolkit-command-in-WFA-and-in/m-p/114686#M20368</link>
      <description>&lt;P&gt;Hi Walter,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure why the CmdLet isn't working in WFA however you can use the "Invoke-NcSsh" CmdLet to execute a CLI command from WFA as a workaround.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Matt&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2016 08:56:28 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Differences-between-executing-powershell-toolkit-command-in-WFA-and-in/m-p/114686#M20368</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2016-01-15T08:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Differences between executing powershell toolkit command in WFA and in powershell CLI</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Differences-between-executing-powershell-toolkit-command-in-WFA-and-in/m-p/114692#M20372</link>
      <description>&lt;P&gt;Walter,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the below code and got the same error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;===Code failed===&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Connect-WfaCluster "1.2.3.4"&lt;BR /&gt;New-NcNetFirewallPolicy -Vserver vs1 -Name test2 -Service dns -AllowAddress "1.1.1.1/32,1.1.1.1/32"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;===&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Th problem is using quotes for AllowAddress&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use the below code and it will work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the the below code in a WFA command and it woked for me. I didn't use double quotes for dns-allowAddress. Single quotes also produce the same error. So avoid both.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;===Code Passed ===&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;Connect-WfaCluster "1.2.3.4"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;New-NcNetFirewallPolicy -Vserver vs1 -Name test3 -Service dns -AllowAddress 1.1.1.1/32,1.1.1.1/32&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;===&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;sinhaa&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2016 12:06:32 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Differences-between-executing-powershell-toolkit-command-in-WFA-and-in/m-p/114692#M20372</guid>
      <dc:creator>sinhaa</dc:creator>
      <dc:date>2016-01-15T12:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: Differences between executing powershell toolkit command in WFA and in powershell CLI</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Differences-between-executing-powershell-toolkit-command-in-WFA-and-in/m-p/114723#M20393</link>
      <description>&lt;P&gt;The reason for this error is that -AllowAddess accepts an array if strings. Look at the Get-Help syntax of the cmdlet&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS H:\&amp;gt; Get-help New-NcNetFirewallPolicy&lt;/P&gt;&lt;P&gt;NAME&lt;BR /&gt;New-NcNetFirewallPolicy&lt;BR /&gt;&lt;BR /&gt;SYNOPSIS&lt;BR /&gt;Create a new firewall policy.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SYNTAX&lt;BR /&gt;New-NcNetFirewallPolicy [-Name] &amp;lt;String&amp;gt; [-Vserver] &amp;lt;String&amp;gt; [-Service] &amp;lt;String&amp;gt; &lt;FONT color="#0000FF"&gt;[-AllowAddress] &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&amp;lt;String[]&amp;gt;&lt;/FONT&gt; [-Controller &amp;lt;NcController[]&amp;gt;] [-ZapiRetryCount &amp;lt;Int32&amp;gt;] [&amp;lt;CommonParameters&amp;gt;]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;DESCRIPTION&lt;BR /&gt;Create a new firewall policy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So when you put the AllowAddress i quotes, they are treated as a string. When you put nothing, Powershell can ideantify the comma seperated values as an array of strings.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could have used&lt;/P&gt;&lt;P&gt;====&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$allowAddress= @("1.1.1.1/32","1.1.1.1/32")&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;New-NcNetFirewallPolicy -Vserver vs1 -Name test3 -Service dns -AllowAddress $allowAddress&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;===&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And there is NO difference between running a cmdlet in Powershell console CLI or in WFA comamnd except the latter runs in non-ineractive mode. That's all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sinhaa&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jan 2016 09:21:33 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Differences-between-executing-powershell-toolkit-command-in-WFA-and-in/m-p/114723#M20393</guid>
      <dc:creator>sinhaa</dc:creator>
      <dc:date>2016-01-18T09:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: Differences between executing powershell toolkit command in WFA and in powershell CLI</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Differences-between-executing-powershell-toolkit-command-in-WFA-and-in/m-p/114733#M20395</link>
      <description>&lt;P&gt;This does the trick. Thanks sinhaa&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jan 2016 12:41:25 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Differences-between-executing-powershell-toolkit-command-in-WFA-and-in/m-p/114733#M20395</guid>
      <dc:creator>kiessl</dc:creator>
      <dc:date>2016-01-18T12:41:25Z</dc:date>
    </item>
  </channel>
</rss>

