<?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: Is there a better way query volume total space in powershell? in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Is-there-a-better-way-query-volume-total-space-in-powershell/m-p/31071#M1447</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tony,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you try running this command and check if it serves your purpose? Just Copy Paste the entire snippet below to your powershell console.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get-NaVol | Select @{Name="VolumeName";Expression={$_.name}},@{Name="TotalSize(GB)";Expression={[math]::Round([decimal]$_.SizeTotal/1gb,2)}}`&lt;/P&gt;&lt;P&gt;,@{Name="AvailableSize(GB)";Expression={[math]::Round([decimal]$_.SizeAvailable/1gb,2)}}`&lt;/P&gt;&lt;P&gt;,@{Name="UsedSize(GB)";Expression={[math]::Round([decimal]$_.SizeUsed/1gb,2)}}`&lt;/P&gt;&lt;P&gt;,@{Name="SnapshotBlocksReserved(GB)";Expression={[math]::Round([decimal]$_.SnapshotBlocksReserved/1gb,2)}}`&lt;/P&gt;&lt;P&gt;,SnapshotPercentReserved&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also affix an | Export-CSV to this cnippet to export it to a csv file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://community.netapp.com/legacyfs/online/18457_volinfo.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Jan 2013 09:50:44 GMT</pubDate>
    <dc:creator>vinith</dc:creator>
    <dc:date>2013-01-23T09:50:44Z</dc:date>
    <item>
      <title>Is there a better way query volume total space in powershell?</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Is-there-a-better-way-query-volume-total-space-in-powershell/m-p/31067#M1446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My boss wanted information about the total capacity of each of our volumes(So including snapshot reserve) along with used space and available. I was going to use get-navol but i noticed this only gives the usable space of the volume not the true total. So i hacked together this script using both get-navol and get-navolsize cmd-let to get what i needed. This is my second script i have ever wrote in PowerShell so i am sure i did a several things wrong but i was able to get the results i wanted. It just seems like it should have been less work and a better way of doing this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VolumeName,VolumeAvailableSpace,VolumeUsedSpace,VolumeTotalsize&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13589187145579057" jivemacro_uid="_13589187145579057" modifiedtitle="true"&gt;&lt;P&gt;param([string]$paNetAppHost, [string]$pausername)&lt;/P&gt;&lt;P&gt;Import-module DataOnTap&lt;/P&gt;&lt;P&gt; $PathtoCSV = "C:\NetappTotalVolume.csv"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#Connect to filer&lt;/P&gt;&lt;P&gt;Connect-NAController $paNetAppHost–cred $pausername&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$allvolumesnames = get-navol | Select-Object Name,Available&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#set headers of CSV file&lt;/P&gt;&lt;P&gt;"VolumeName,Available Space(GB),Used Space(GB),Total Volume Space(GB)" &amp;gt; $PathtoCSV&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;foreach ($netapp_vol in $allvolumesnames) {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; line-height: 12pt;"&gt;$CurrentVolname = $netapp_vol.name&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;$VolumesAvailable = $netapp_vol.available &lt;/P&gt;&lt;P&gt;$VolumeSizeTotal = get-navolsize -name $CurrentVolname | Select-Object -ExpandProperty VolumeSize &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#Convert to GB&lt;/P&gt;&lt;P&gt;$VolumeAvailable1GB = ($VolumesAvailable / 1GB)&lt;/P&gt;&lt;P&gt;$VolumeSizeTotal1GB = ($VolumeSizeTotal / 1GB)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#Calc usedspace &lt;/P&gt;&lt;P&gt;$VolumeUsedSpace1GB = $VolumeSizeTotal1GB - $VolumeAvailable1GB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#Create/add to CSV file&lt;/P&gt;&lt;P&gt;$Combine = $CurrentVolname,$VolumeAvailable1GB,$VolumeUsedSpace1GB,$VolumeSizeTotal1GB&lt;/P&gt;&lt;P&gt;$Combine -join "," &amp;gt;&amp;gt; $PathtoCSV&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 06:11:43 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Is-there-a-better-way-query-volume-total-space-in-powershell/m-p/31067#M1446</guid>
      <dc:creator>TONY_UNGER</dc:creator>
      <dc:date>2025-06-05T06:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a better way query volume total space in powershell?</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Is-there-a-better-way-query-volume-total-space-in-powershell/m-p/31071#M1447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tony,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you try running this command and check if it serves your purpose? Just Copy Paste the entire snippet below to your powershell console.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get-NaVol | Select @{Name="VolumeName";Expression={$_.name}},@{Name="TotalSize(GB)";Expression={[math]::Round([decimal]$_.SizeTotal/1gb,2)}}`&lt;/P&gt;&lt;P&gt;,@{Name="AvailableSize(GB)";Expression={[math]::Round([decimal]$_.SizeAvailable/1gb,2)}}`&lt;/P&gt;&lt;P&gt;,@{Name="UsedSize(GB)";Expression={[math]::Round([decimal]$_.SizeUsed/1gb,2)}}`&lt;/P&gt;&lt;P&gt;,@{Name="SnapshotBlocksReserved(GB)";Expression={[math]::Round([decimal]$_.SnapshotBlocksReserved/1gb,2)}}`&lt;/P&gt;&lt;P&gt;,SnapshotPercentReserved&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also affix an | Export-CSV to this cnippet to export it to a csv file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://community.netapp.com/legacyfs/online/18457_volinfo.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 09:50:44 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Is-there-a-better-way-query-volume-total-space-in-powershell/m-p/31071#M1447</guid>
      <dc:creator>vinith</dc:creator>
      <dc:date>2013-01-23T09:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a better way query volume total space in powershell?</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Is-there-a-better-way-query-volume-total-space-in-powershell/m-p/31081#M1448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like i can take SnapshotPercentReserved and use that to calculate what I was looking for without having to use get-navolsize&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>Wed, 23 Jan 2013 20:56:48 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Is-there-a-better-way-query-volume-total-space-in-powershell/m-p/31081#M1448</guid>
      <dc:creator>TONY_UNGER</dc:creator>
      <dc:date>2013-01-23T20:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a better way query volume total space in powershell?</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Is-there-a-better-way-query-volume-total-space-in-powershell/m-p/31085#M1449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To get the value i wanted without using get-navolsize i added this to my script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$VolumeSizeTotal = [math]::Round([decimal]((($netapp_vol.snapshotpercentreserved * 100) * $netapp_vol.TotalSize) + $netapp_vol.TotalSize)/1gb,2)&lt;/P&gt;&lt;P&gt;ill have to start using hashtables on my next script&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 20:41:15 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Is-there-a-better-way-query-volume-total-space-in-powershell/m-p/31085#M1449</guid>
      <dc:creator>TONY_UNGER</dc:creator>
      <dc:date>2013-01-24T20:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a better way query volume total space in powershell?</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Is-there-a-better-way-query-volume-total-space-in-powershell/m-p/95691#M4026</link>
      <description>&lt;P&gt;Is there a way to get the value for Snapshot copies space used?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Nov 2014 11:05:28 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Is-there-a-better-way-query-volume-total-space-in-powershell/m-p/95691#M4026</guid>
      <dc:creator>Carol</dc:creator>
      <dc:date>2014-11-03T11:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a better way query volume total space in powershell?</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Is-there-a-better-way-query-volume-total-space-in-powershell/m-p/95697#M4027</link>
      <description>&lt;P&gt;show-nahelp&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When the explorer pops up select the cmdlets at the top of the page.&amp;nbsp; There are a few commands for getting detailed snapshot information. &lt;STRONG&gt;Get-nasnapshotvolumespace&amp;nbsp;&lt;/STRONG&gt; may be the one you are looking for.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Nov 2014 12:05:09 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Is-there-a-better-way-query-volume-total-space-in-powershell/m-p/95697#M4027</guid>
      <dc:creator>CASTROJSEC</dc:creator>
      <dc:date>2014-11-03T12:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a better way query volume total space in powershell?</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Is-there-a-better-way-query-volume-total-space-in-powershell/m-p/95703#M4028</link>
      <description>&lt;P&gt;This gives me the total snapshot space available, I need to get the snapshot space used ?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Nov 2014 12:55:28 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Is-there-a-better-way-query-volume-total-space-in-powershell/m-p/95703#M4028</guid>
      <dc:creator>Carol</dc:creator>
      <dc:date>2014-11-03T12:55:28Z</dc:date>
    </item>
  </channel>
</rss>

