<?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: Get the netapp cluster mode count and the  total sizeper disks type in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-the-netapp-cluster-mode-count-and-the-total-sizeper-disks-type/m-p/126514#M5170</link>
    <description>&lt;P&gt;Interesting..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;start with get-ncdisk&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And to convert the numbers use convertto-formattednumber cmdlet&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Dec 2016 19:45:09 GMT</pubDate>
    <dc:creator>JGPSHNTAP</dc:creator>
    <dc:date>2016-12-22T19:45:09Z</dc:date>
    <item>
      <title>Get the netapp cluster mode count and the  total sizeper disks type</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-the-netapp-cluster-mode-count-and-the-total-sizeper-disks-type/m-p/126511#M5167</link>
      <description>&lt;P&gt;Good afternoon,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new in powershell and i want to know if someone could help me collecting the count of disks and also the total usable space per each disks type.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$AllDisks7M += $NonMetroDisks7M&lt;BR /&gt;$AllDisks7M += $MetroDisks7M&lt;BR /&gt;$AllDisks7M += $ReplicationDisks7M&lt;BR /&gt;ForEach($Disk7M in $AllDisks7M)&lt;BR /&gt;{&lt;BR /&gt;$foundType = 0&lt;BR /&gt;for($i = 0; $i -le $DiskTypes7M.Length-1; $i++)&lt;BR /&gt;{&lt;BR /&gt;if($DiskTypes7M[$i][0] -eq $Disk7M.PhysSpace)&lt;BR /&gt;{&lt;BR /&gt;$DiskTypes7M[$i][1] ++&lt;BR /&gt;$foundType = 1&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;if(!$foundType)&lt;BR /&gt;{&lt;BR /&gt;$DiskTypes7M += ,@($Disk7M.PhysSpace, 1)&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;$DiskTypes7M = $DiskTypes7M | sort-object @{Expression={$_[0]}; Ascending=$false}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used that script for collecting on 7 mode but it is not working on cluster mode prompting this message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You cannot call a method on a null-valued expression.&lt;BR /&gt;At line:103 char:1&lt;BR /&gt;+ $p.TotalSize = $PDCTSizeCM.toString()&lt;BR /&gt;+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;+ CategoryInfo : InvalidOperation: (:) [], RuntimeException&lt;BR /&gt;+ FullyQualifiedErrorId : InvokeMethodOnNull&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 15:38:54 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-the-netapp-cluster-mode-count-and-the-total-sizeper-disks-type/m-p/126511#M5167</guid>
      <dc:creator>tchuise92</dc:creator>
      <dc:date>2025-06-04T15:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Get the netapp cluster mode count and the  total sizeper disks type</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-the-netapp-cluster-mode-count-and-the-total-sizeper-disks-type/m-p/126512#M5168</link>
      <description>&lt;P&gt;What is the expected output of your script?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2016 19:28:35 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-the-netapp-cluster-mode-count-and-the-total-sizeper-disks-type/m-p/126512#M5168</guid>
      <dc:creator>asulliva</dc:creator>
      <dc:date>2016-12-22T19:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: Get the netapp cluster mode count and the  total sizeper disks type</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-the-netapp-cluster-mode-count-and-the-total-sizeper-disks-type/m-p/126513#M5169</link>
      <description>&lt;P&gt;&lt;FONT color="#ff0000" face="Lucida Console" size="1"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;this for example is the output of the 7 mode&lt;/P&gt;&lt;P&gt;PS C:\Users\XXXX&amp;gt; $DiskTypes7M&lt;/P&gt;&lt;P&gt;4000787030016&lt;/P&gt;&lt;P&gt;200&lt;/P&gt;&lt;P&gt;1778132385792&lt;/P&gt;&lt;P&gt;231&lt;/P&gt;&lt;P&gt;588124522352&lt;/P&gt;&lt;P&gt;701&lt;/P&gt;&lt;P&gt;587421531156&lt;/P&gt;&lt;P&gt;305&lt;/P&gt;&lt;P&gt;293710764580&lt;/P&gt;&lt;P&gt;216&lt;/P&gt;&lt;P&gt;288196759322&lt;/P&gt;&lt;P&gt;457&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to have this type of matrix for the cluster mode as well&lt;/P&gt;&lt;P&gt;for example for the first 2 lines&lt;/P&gt;&lt;P&gt;the longer number is&amp;nbsp;the total size of the&amp;nbsp;200 disks type X306-XXXXXXXX of my system&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2016 19:34:20 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-the-netapp-cluster-mode-count-and-the-total-sizeper-disks-type/m-p/126513#M5169</guid>
      <dc:creator>tchuise92</dc:creator>
      <dc:date>2016-12-22T19:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: Get the netapp cluster mode count and the  total sizeper disks type</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-the-netapp-cluster-mode-count-and-the-total-sizeper-disks-type/m-p/126514#M5170</link>
      <description>&lt;P&gt;Interesting..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;start with get-ncdisk&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And to convert the numbers use convertto-formattednumber cmdlet&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2016 19:45:09 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-the-netapp-cluster-mode-count-and-the-total-sizeper-disks-type/m-p/126514#M5170</guid>
      <dc:creator>JGPSHNTAP</dc:creator>
      <dc:date>2016-12-22T19:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: Get the netapp cluster mode count and the  total sizeper disks type</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-the-netapp-cluster-mode-count-and-the-total-sizeper-disks-type/m-p/126520#M5171</link>
      <description>&lt;P&gt;When I use this command it show the size of the different disks not the total size like I was thinking&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ConvertTo-FormattedNumber 4000787030016&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ConvertTo-FormattedNumber 4000787030016&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ConvertTo-FormattedNumber 1778132385792&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ConvertTo-FormattedNumber 588124721152&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ConvertTo-FormattedNumber 587421536256&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ConvertTo-FormattedNumber 293710766080&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ConvertTo-FormattedNumber 288196759552&lt;BR /&gt;4T&lt;BR /&gt;4T&lt;BR /&gt;2T&lt;BR /&gt;588G&lt;BR /&gt;587G&lt;BR /&gt;294G&lt;BR /&gt;288G&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2016 20:23:17 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-the-netapp-cluster-mode-count-and-the-total-sizeper-disks-type/m-p/126520#M5171</guid>
      <dc:creator>tchuise92</dc:creator>
      <dc:date>2016-12-22T20:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: Get the netapp cluster mode count and the  total sizeper disks type</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-the-netapp-cluster-mode-count-and-the-total-sizeper-disks-type/m-p/126521#M5172</link>
      <description>&lt;P&gt;Here's what I came up with...you'll want to adjust depending on what you want to see.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$diskReport = @{}

Get-NcDisk | %{
    $diskCapacity = ConvertTo-FormattedNumber ($_.DiskInventoryInfo.BytesPerSector * $_.DiskInventoryInfo.RightSizeSectors)
    $id = "$($_.DiskInventoryInfo.DiskType)_$($diskCapacity)"

    if ($diskReport.Keys -notcontains $id) {
        $diskReport.$($id) = @{ 'Capacity' = 0; 'Count' = 0; }
    }
    
    $diskReport.$($id).Capacity += $_.Capacity
    $diskReport.$($id).Count++
        
}

$diskReport.GetEnumerator() | Select @{'N'="DiskType";'E'={ $_.Name }}, @{'N'="TotalRawCapacity";'E'={ ConvertTo-FormattedNumber $_.Value.Capacity }},@{'N'="Count";'E'={ ConvertTo-FormattedNumber $_.Value.Count }}&lt;/PRE&gt;&lt;P&gt;This will show the disk type (SAS, SSD, SATA) and the right size value as a single field, e.g. "SAS_1T", along with the total &lt;U&gt;&lt;STRONG&gt;raw&lt;/STRONG&gt;&lt;/U&gt; capacity of the disk type in the system and the count.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;DiskType TotalRawCapacity Count
-------- ---------------- -----
SAS_445G 43T              96   
SAS_1T   49T              40   
SSD_406G 3T               8    &lt;/PRE&gt;&lt;P&gt;Andrew&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2016 20:32:29 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-the-netapp-cluster-mode-count-and-the-total-sizeper-disks-type/m-p/126521#M5172</guid>
      <dc:creator>asulliva</dc:creator>
      <dc:date>2016-12-22T20:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Get the netapp cluster mode count and the  total sizeper disks type</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-the-netapp-cluster-mode-count-and-the-total-sizeper-disks-type/m-p/126522#M5173</link>
      <description>&lt;P&gt;If you want to use disk model for the "type" information that's an easy modification from what I had originally...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$diskReport = @{}

Get-NcDisk | %{
    $id = $_.DiskInventoryInfo.Model

    if ($diskReport.Keys -notcontains $id) {
        $diskReport.$($id) = @{ 'Capacity' = 0; 'Count' = 0; }
    }
    
    $diskReport.$($id).Capacity += ($_.DiskInventoryInfo.BytesPerSector * $_.DiskInventoryInfo.RightSizeSectors)
    $diskReport.$($id).Count++
        
}

$diskReport.GetEnumerator() | Select `
    @{'N'="DiskType";'E'={ $_.Name }}, `
    @{'N'="TotalRawCapacity";'E'={ ConvertTo-FormattedNumber $_.Value.Capacity DataSize "0.00" }}, `
    @{'N'="Count";'E'={ ConvertTo-FormattedNumber $_.Value.Count }}&lt;/PRE&gt;&lt;P&gt;Which results in:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;DiskType         TotalRawCapacity Count
--------         ---------------- -----
X438_1625400MCSG 2.95 TB          8    
X425_HCBEP1T2A10 44.26 TB         40   
X421_FAL12450A10 38.46 TB         95   
X421_HCOBD450A10 414.58 GB        1    &lt;/PRE&gt;&lt;P&gt;Note I changed Convertto-FormattedNumber to use more precision in the output also.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2016 20:40:25 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-the-netapp-cluster-mode-count-and-the-total-sizeper-disks-type/m-p/126522#M5173</guid>
      <dc:creator>asulliva</dc:creator>
      <dc:date>2016-12-22T20:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: Get the netapp cluster mode count and the  total sizeper disks type</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-the-netapp-cluster-mode-count-and-the-total-sizeper-disks-type/m-p/130516#M5365</link>
      <description>&lt;P&gt;Thank you a lot Andrews, I have been off work for a while that helps me a lot.I will test it in my&amp;nbsp;environment&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2017 12:17:53 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-the-netapp-cluster-mode-count-and-the-total-sizeper-disks-type/m-p/130516#M5365</guid>
      <dc:creator>tchuise92</dc:creator>
      <dc:date>2017-04-26T12:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: Get the netapp cluster mode count and the  total sizeper disks type</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-the-netapp-cluster-mode-count-and-the-total-sizeper-disks-type/m-p/147310#M5987</link>
      <description>&lt;P&gt;This is great thanks! How can this be iterated for many filers?&amp;nbsp; tx.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2019 00:27:14 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-the-netapp-cluster-mode-count-and-the-total-sizeper-disks-type/m-p/147310#M5987</guid>
      <dc:creator>anne_thom</dc:creator>
      <dc:date>2019-03-20T00:27:14Z</dc:date>
    </item>
  </channel>
</rss>

