<?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: Problems with Get-NcVol using variables in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Problems-with-Get-NcVol-using-variables/m-p/164042#M6342</link>
    <description>&lt;P&gt;What version of the PSTK are you using? I am running 9.7.1.1 and it seems to work for me using the code from your examples. Are you able to duplicate the issue on another machine? Another thing that came to mind was case-sensitivity - is it possible that the volume name contains upper case letters in ONTAP but not in the variable?&lt;/P&gt;</description>
    <pubDate>Tue, 16 Feb 2021 14:36:19 GMT</pubDate>
    <dc:creator>donny_lang</dc:creator>
    <dc:date>2021-02-16T14:36:19Z</dc:date>
    <item>
      <title>Problems with Get-NcVol using variables</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Problems-with-Get-NcVol-using-variables/m-p/163896#M6340</link>
      <description>&lt;P&gt;I'm having a problem and I don't understand why it's not working and I'm now wondering if I'm running into some kind of bug and was looking for some suggestions.&amp;nbsp; If I try the following:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Get-NcVol&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;-VServer&amp;nbsp;ams4-lb8020svm-&lt;/SPAN&gt;&lt;SPAN&gt;01&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;-Name&amp;nbsp;vol_ams4_lbucs_10&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;or&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$volName&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"vol_ams4_lbucs_10"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Get-NcVol&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;-VServer&amp;nbsp;ams4-lb8020svm-&lt;/SPAN&gt;&lt;SPAN&gt;01&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;-Name&amp;nbsp;$volName&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Both of these works, however if I use the following it doesn't return anything even though the variable is still of a type string:-&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$volName&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;=&amp;nbsp;(&lt;/SPAN&gt;&lt;SPAN&gt;$Datastores&lt;/SPAN&gt;&lt;SPAN&gt;.VolumeName&lt;/SPAN&gt;&lt;SPAN&gt;).ToString()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Get-NcVol&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;-VServer&amp;nbsp;ams4-lb8020svm-&lt;/SPAN&gt;&lt;SPAN&gt;01&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;-Name&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;$volName&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Output of variable details:-&lt;/DIV&gt;&lt;DIV&gt;PS D:\Development\$volName&lt;BR /&gt;vol_lhr4_lbucs_01&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;PS D:\Development\$volname.GetType().Name&lt;BR /&gt;String&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Anyone have any ideas?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 04 Jun 2025 10:35:35 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Problems-with-Get-NcVol-using-variables/m-p/163896#M6340</guid>
      <dc:creator>jmoss</dc:creator>
      <dc:date>2025-06-04T10:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Get-NcVol using variables</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Problems-with-Get-NcVol-using-variables/m-p/164042#M6342</link>
      <description>&lt;P&gt;What version of the PSTK are you using? I am running 9.7.1.1 and it seems to work for me using the code from your examples. Are you able to duplicate the issue on another machine? Another thing that came to mind was case-sensitivity - is it possible that the volume name contains upper case letters in ONTAP but not in the variable?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2021 14:36:19 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Problems-with-Get-NcVol-using-variables/m-p/164042#M6342</guid>
      <dc:creator>donny_lang</dc:creator>
      <dc:date>2021-02-16T14:36:19Z</dc:date>
    </item>
  </channel>
</rss>

