<?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 Problem using Split-NcNetPortBroadcastDomain from a script in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Problem-using-Split-NcNetPortBroadcastDomain-from-a-script/m-p/113445#M4603</link>
    <description>&lt;P&gt;Hi All,&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;I am relatively new to PowerShell and the NetApp toolkit (using 4.0, powershell version is 4), but I am writing a script to completely automate a cluster setup for the clusters in my lab with the various settings that I want to have (only after the cluster is created and all nodes have been joined to the cluster).&amp;nbsp; I am currently having issues using the command "&lt;STRONG&gt;Split-NcNetPortBroadcastDomain&lt;/STRONG&gt;" from a script or even in the CLI after having defined a variable.Here is the line as I am using it in my script:&lt;/P&gt;&lt;PRE&gt;Split-NcNetPortBroadcastDomain  -Name Default -NewName $NewBroadcastDomain -Port $BroadcastDomainPorts&lt;/PRE&gt;&lt;P&gt;And here is the error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Split-NcNetPortBroadcastDomain : Invalid value specified for "ports" element within "net-port-broadcast-domain-split":
"node-01:e0d,node-02:e0d".
At C:\Tools\clustersetup.ps1:181 char:4
+             Split-NcNetPortBroadcastDomain  -Name Default -NewName $NewBroadcastDomain -P ...
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (node.local:NcController) [Split-NcNetPortBroadcastDomain], EINVALIDINP
   UTERROR
    + FullyQualifiedErrorId : ApiException,DataONTAP.C.PowerShell.SDK.Cmdlets.Net.SplitNcNetPortBroadcastDomain



&lt;/PRE&gt;&lt;P&gt;Outside of the script I tested the command which works just fine without a variable, but as soon as I use a variable, the command fails. I am able to use the following similar commands with the same variables without issues:&lt;/P&gt;&lt;PRE&gt;Set-NcNetPortBroadcastDomain -Name Default -RemovePort $BroadcastDomainPorts


Set-NcNetPortBroadcastDomain -Name $NewBroadcastDomain -AddPort $BroadcastDomainPorts&lt;/PRE&gt;&lt;P&gt;Does anyone have any ideas? Just one last bit of info... the variable I am using is 100% for sure a string like the help says is required!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jun 2025 22:34:39 GMT</pubDate>
    <dc:creator>dhepler</dc:creator>
    <dc:date>2025-06-04T22:34:39Z</dc:date>
    <item>
      <title>Problem using Split-NcNetPortBroadcastDomain from a script</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Problem-using-Split-NcNetPortBroadcastDomain-from-a-script/m-p/113445#M4603</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;I am relatively new to PowerShell and the NetApp toolkit (using 4.0, powershell version is 4), but I am writing a script to completely automate a cluster setup for the clusters in my lab with the various settings that I want to have (only after the cluster is created and all nodes have been joined to the cluster).&amp;nbsp; I am currently having issues using the command "&lt;STRONG&gt;Split-NcNetPortBroadcastDomain&lt;/STRONG&gt;" from a script or even in the CLI after having defined a variable.Here is the line as I am using it in my script:&lt;/P&gt;&lt;PRE&gt;Split-NcNetPortBroadcastDomain  -Name Default -NewName $NewBroadcastDomain -Port $BroadcastDomainPorts&lt;/PRE&gt;&lt;P&gt;And here is the error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Split-NcNetPortBroadcastDomain : Invalid value specified for "ports" element within "net-port-broadcast-domain-split":
"node-01:e0d,node-02:e0d".
At C:\Tools\clustersetup.ps1:181 char:4
+             Split-NcNetPortBroadcastDomain  -Name Default -NewName $NewBroadcastDomain -P ...
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (node.local:NcController) [Split-NcNetPortBroadcastDomain], EINVALIDINP
   UTERROR
    + FullyQualifiedErrorId : ApiException,DataONTAP.C.PowerShell.SDK.Cmdlets.Net.SplitNcNetPortBroadcastDomain



&lt;/PRE&gt;&lt;P&gt;Outside of the script I tested the command which works just fine without a variable, but as soon as I use a variable, the command fails. I am able to use the following similar commands with the same variables without issues:&lt;/P&gt;&lt;PRE&gt;Set-NcNetPortBroadcastDomain -Name Default -RemovePort $BroadcastDomainPorts


Set-NcNetPortBroadcastDomain -Name $NewBroadcastDomain -AddPort $BroadcastDomainPorts&lt;/PRE&gt;&lt;P&gt;Does anyone have any ideas? Just one last bit of info... the variable I am using is 100% for sure a string like the help says is required!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 22:34:39 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Problem-using-Split-NcNetPortBroadcastDomain-from-a-script/m-p/113445#M4603</guid>
      <dc:creator>dhepler</dc:creator>
      <dc:date>2025-06-04T22:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using Split-NcNetPortBroadcastDomain from a script</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Problem-using-Split-NcNetPortBroadcastDomain-from-a-script/m-p/113447#M4604</link>
      <description>&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you try defining the $BroadcastDomainPorts as an array instead?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$BroadcastDomainPorts = ("node-01:e0d", :node-02:e0d")&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see the man page says the Port parameter should be a String&lt;STRONG&gt;[]&lt;/STRONG&gt;, not a String ... On the CLI a comma seperated string is automatically treated as an array, but not so inside a script. That might be why it's working when executed directly on the CLI but fails inside the script ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Aparajita&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2015 10:13:50 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Problem-using-Split-NcNetPortBroadcastDomain-from-a-script/m-p/113447#M4604</guid>
      <dc:creator>Aparajita</dc:creator>
      <dc:date>2015-12-08T10:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using Split-NcNetPortBroadcastDomain from a script</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Problem-using-Split-NcNetPortBroadcastDomain-from-a-script/m-p/113448#M4605</link>
      <description>&lt;P&gt;I think you may be right. I will test a bit more and let you know. Strange that the other commands did not have a problem but this one did. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2015 10:30:28 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Problem-using-Split-NcNetPortBroadcastDomain-from-a-script/m-p/113448#M4605</guid>
      <dc:creator>dhepler</dc:creator>
      <dc:date>2015-12-08T10:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using Split-NcNetPortBroadcastDomain from a script</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Problem-using-Split-NcNetPortBroadcastDomain-from-a-script/m-p/113452#M4606</link>
      <description>&lt;P&gt;So, after re-writing that part of my script a bit I tested using an array instead of just a [string] and it worked! Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2015 13:08:38 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Problem-using-Split-NcNetPortBroadcastDomain-from-a-script/m-p/113452#M4606</guid>
      <dc:creator>dhepler</dc:creator>
      <dc:date>2015-12-08T13:08:38Z</dc:date>
    </item>
  </channel>
</rss>

