<?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: New-NaQtree fails when passing quotes into the cmdlet in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/New-NaQtree-fails-when-passing-quotes-into-the-cmdlet/m-p/61334#M3053</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like a problem with the way the toolkit handles QTree paths with spaces.&amp;nbsp; Until that's resolved, you can invoke the API directly like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Invoke-NaSystemApi "&amp;lt;qtree-create&amp;gt; &amp;lt;volume&amp;gt;$Volume&amp;lt;/volume&amp;gt; &amp;lt;qtree&amp;gt;$qtreename&amp;lt;/qtree&amp;gt; &amp;lt;/qtree-create&amp;gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not real pretty, but it should do what you want...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Dec 2012 16:59:04 GMT</pubDate>
    <dc:creator>timothyn</dc:creator>
    <dc:date>2012-12-03T16:59:04Z</dc:date>
    <item>
      <title>New-NaQtree fails when passing quotes into the cmdlet</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/New-NaQtree-fails-when-passing-quotes-into-the-cmdlet/m-p/61315#M3050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to create a script that will create numerous qtrees that have spaces in the qtree name.&amp;nbsp; I am importing the qtree names from a CSV file and building an array with the full path of the qtree.&amp;nbsp; Here is a overview of how I am building the qtree path:&lt;/P&gt;&lt;P&gt;start-loop:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $Qtree = [char]34 + "/vol/" + $Volume + "/" + $qtreename + [char]34&lt;/P&gt;&lt;P&gt;end-loop:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Execute the qtree creations:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-loop:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; New-NaQtree $Qtree&lt;/P&gt;&lt;P&gt;end-loop:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I write the command to the screen with the following command I can copy and paste the output and it runs just fine:&lt;/P&gt;&lt;P&gt;write-host "New-NaQtree" $Qtree&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;When I attempt to loop through the array and execute the qtree creations it fails because it "can't determine volume/qtree names"&amp;nbsp; The quotes in the path seem to be messing with the ability to find the qtree path.&amp;nbsp; I attempted to put the entire command into the array and use the invoke expression to run the command.&amp;nbsp; Here is a sample of what I tried:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-loop:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $Qtree = "New-NaQtree " + [char]34 + "/vol/" + $Volume + "/" + $qtreename + [char]34&lt;/P&gt;&lt;P&gt;end-loop:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Execute the qtree creations:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-loop:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ($Qtree) | Invoke-Expression&lt;/P&gt;&lt;P&gt;end-loop:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seems to work but it drops the quotes so all of the qtree names that contain spaces are created incorrectly.&amp;nbsp; Can someone please help me figure out how to get these qtrees created when using quotes??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 06:14:26 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/New-NaQtree-fails-when-passing-quotes-into-the-cmdlet/m-p/61315#M3050</guid>
      <dc:creator>tbath2378</dc:creator>
      <dc:date>2025-06-05T06:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: New-NaQtree fails when passing quotes into the cmdlet</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/New-NaQtree-fails-when-passing-quotes-into-the-cmdlet/m-p/61321#M3051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My guess is this is not possible through the API ( and thus the new-naqtree cmdlet).&amp;nbsp; I don't see a way to get this to work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, there is a workaround.&amp;nbsp; Try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$qtree = "/vol/$volumename`/$qtreename"&lt;/P&gt;&lt;P&gt;Invoke-NaSsh "qtree create `"$qtree`""&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One other note, is the storage management guide recommends against using certain characters (namely, spaces and commas) in QTree names for various reasons, including that it breaks SnapMirror:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;&lt;P&gt;Qtree name restrictions&lt;/P&gt;&lt;P&gt;Using some special characters in qtree names, such as commas and spaces, can cause problems with&lt;/P&gt;&lt;P&gt;other Data ONTAP capabilities, and should be avoided.&lt;/P&gt;&lt;P&gt;The following characters should be avoided in qtree names:&lt;/P&gt;&lt;P&gt;• Space&lt;/P&gt;&lt;P&gt;Spaces in qtree names can prevent SnapMirror updates from working correctly.&lt;/P&gt;&lt;P&gt;• Comma&lt;/P&gt;&lt;P&gt;Commas in qtree names can prevent quotas from working correctly for that qtree, unless the name&lt;/P&gt;&lt;P&gt;is enclosed in double quotation marks.&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2012 15:51:47 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/New-NaQtree-fails-when-passing-quotes-into-the-cmdlet/m-p/61321#M3051</guid>
      <dc:creator>bsti</dc:creator>
      <dc:date>2012-12-03T15:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: New-NaQtree fails when passing quotes into the cmdlet</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/New-NaQtree-fails-when-passing-quotes-into-the-cmdlet/m-p/61329#M3052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the reply.&amp;nbsp; The issue is that we are moving from a legacy Celerra to the Netapp and all of the tree quotas on the Celerra were created with the spaces in the names.&amp;nbsp; In order to not break everything we had to leave the spaces in place.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2012 16:33:08 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/New-NaQtree-fails-when-passing-quotes-into-the-cmdlet/m-p/61329#M3052</guid>
      <dc:creator>tbath2378</dc:creator>
      <dc:date>2012-12-03T16:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: New-NaQtree fails when passing quotes into the cmdlet</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/New-NaQtree-fails-when-passing-quotes-into-the-cmdlet/m-p/61334#M3053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like a problem with the way the toolkit handles QTree paths with spaces.&amp;nbsp; Until that's resolved, you can invoke the API directly like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Invoke-NaSystemApi "&amp;lt;qtree-create&amp;gt; &amp;lt;volume&amp;gt;$Volume&amp;lt;/volume&amp;gt; &amp;lt;qtree&amp;gt;$qtreename&amp;lt;/qtree&amp;gt; &amp;lt;/qtree-create&amp;gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not real pretty, but it should do what you want...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2012 16:59:04 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/New-NaQtree-fails-when-passing-quotes-into-the-cmdlet/m-p/61334#M3053</guid>
      <dc:creator>timothyn</dc:creator>
      <dc:date>2012-12-03T16:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: New-NaQtree fails when passing quotes into the cmdlet</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/New-NaQtree-fails-when-passing-quotes-into-the-cmdlet/m-p/61341#M3054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much that works like a champ!!&amp;nbsp; Now I am also having an issue with setting quotas on the qtree when there are space is the name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe I can use the same invoke-NaSystemApi "&amp;lt;quota-add-entry&amp;gt; "??&amp;nbsp; But I am unsure on the rest of the syntax.&amp;nbsp; My command would have been Add-naquota tree "/vol/office01/A B" -Threshold 100g.&amp;nbsp; This of course is having the same issue as the earlier qtree create command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2012 17:41:24 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/New-NaQtree-fails-when-passing-quotes-into-the-cmdlet/m-p/61341#M3054</guid>
      <dc:creator>tbath2378</dc:creator>
      <dc:date>2012-12-03T17:41:24Z</dc:date>
    </item>
  </channel>
</rss>

