<?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 how can i add the volsize function into this in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/how-can-i-add-the-volsize-function-into-this/m-p/4524#M245</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi everyone, I found a lot of great stuff on this site, and I am just starting with PS cmdlets and scripts, so I give this board a lot of credit for putting out cmdlets and help with code.&lt;/P&gt;&lt;P&gt;Here is the code that I have, and I want to include the Get-naVolSize into it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Connect-NaController mysan &lt;BR /&gt;$AllAggr=Get-NaAggr&lt;BR /&gt;$AllVols=Get-NaVol&lt;BR /&gt;$AllLuns=Get-NaLun&lt;/P&gt;&lt;P&gt;foreach ($aggr in $AllAggr | sort Name){&lt;BR /&gt; write-Host $aggr.Name ($aggr.sizetotal / 1tb) 'TB'&lt;BR /&gt; Foreach ($volume in $AllVols | sort name){&lt;BR /&gt;&amp;nbsp; If ($volume.ContainingAggregate -eq $aggr.Name){&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Write-Host $volume.name' ' ($volume.sizetotal / 1gb)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; this part is great and it shows me what I need to see with the aggregate size and volumes in that aggr and their size like so;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aggrSQL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.7342484 TB&lt;/P&gt;&lt;P&gt;volume_sql1 200 Gb&lt;/P&gt;&lt;P&gt;volume_sql2 100 Gb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I also include the get-navolsize cmdlet into this...&lt;/P&gt;&lt;P&gt;what I want to be able to do is generate a similar output, but also show this;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;volume_sql1 200 Gb free space left 138 Gb&lt;/P&gt;&lt;P&gt;volume_sql2 100 Gb free space left 20 Gb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought about delcaring $VolSize=Get-NaVolSize but I am not sure where to put that, I think I have to pass all the volumes from Get-NaVol to the Get-NaVolSize, but not sure where ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jun 2025 07:06:21 GMT</pubDate>
    <dc:creator>lebedevanton</dc:creator>
    <dc:date>2025-06-05T07:06:21Z</dc:date>
    <item>
      <title>how can i add the volsize function into this</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/how-can-i-add-the-volsize-function-into-this/m-p/4524#M245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi everyone, I found a lot of great stuff on this site, and I am just starting with PS cmdlets and scripts, so I give this board a lot of credit for putting out cmdlets and help with code.&lt;/P&gt;&lt;P&gt;Here is the code that I have, and I want to include the Get-naVolSize into it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Connect-NaController mysan &lt;BR /&gt;$AllAggr=Get-NaAggr&lt;BR /&gt;$AllVols=Get-NaVol&lt;BR /&gt;$AllLuns=Get-NaLun&lt;/P&gt;&lt;P&gt;foreach ($aggr in $AllAggr | sort Name){&lt;BR /&gt; write-Host $aggr.Name ($aggr.sizetotal / 1tb) 'TB'&lt;BR /&gt; Foreach ($volume in $AllVols | sort name){&lt;BR /&gt;&amp;nbsp; If ($volume.ContainingAggregate -eq $aggr.Name){&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Write-Host $volume.name' ' ($volume.sizetotal / 1gb)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; this part is great and it shows me what I need to see with the aggregate size and volumes in that aggr and their size like so;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aggrSQL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.7342484 TB&lt;/P&gt;&lt;P&gt;volume_sql1 200 Gb&lt;/P&gt;&lt;P&gt;volume_sql2 100 Gb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I also include the get-navolsize cmdlet into this...&lt;/P&gt;&lt;P&gt;what I want to be able to do is generate a similar output, but also show this;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;volume_sql1 200 Gb free space left 138 Gb&lt;/P&gt;&lt;P&gt;volume_sql2 100 Gb free space left 20 Gb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought about delcaring $VolSize=Get-NaVolSize but I am not sure where to put that, I think I have to pass all the volumes from Get-NaVol to the Get-NaVolSize, but not sure where ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 07:06:21 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/how-can-i-add-the-volsize-function-into-this/m-p/4524#M245</guid>
      <dc:creator>lebedevanton</dc:creator>
      <dc:date>2025-06-05T07:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: how can i add the volsize function into this</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/how-can-i-add-the-volsize-function-into-this/m-p/4528#M246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found &lt;A href="http://communities.netapp.com/docs/DOC-6349" target="_blank"&gt;http://communities.netapp.com/docs/DOC-6349&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and this is exactly what I need to use&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Oct 2010 19:16:57 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/how-can-i-add-the-volsize-function-into-this/m-p/4528#M246</guid>
      <dc:creator>lebedevanton</dc:creator>
      <dc:date>2010-10-28T19:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: how can i add the volsize function into this</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/how-can-i-add-the-volsize-function-into-this/m-p/4533#M247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad you found what you need.&amp;nbsp; Here's a quick note on numerical formatting: Toolkit 1.2 adds a cmdlet, &lt;STRONG&gt;ConvertTo-FormattedNumber&lt;/STRONG&gt;, for displaying data sizes and other numerical value types in a formatted, readable, and (somewhat) customizable way.&amp;nbsp; I wrote that one primarily to support the data formatters, but it is documented with examples and you can use it in your own scripts as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;PS C:\&amp;gt; $aggr0 = Get-NaAggr aggr0&lt;BR /&gt;PS C:\&amp;gt; ConvertTo-FormattedNumber $aggr0.SizeTotal DataSize "0.00"&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;1.10 TB&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Oct 2010 22:24:43 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/how-can-i-add-the-volsize-function-into-this/m-p/4533#M247</guid>
      <dc:creator>cknight</dc:creator>
      <dc:date>2010-10-28T22:24:43Z</dc:date>
    </item>
  </channel>
</rss>

