<?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: Powershell command to list disks for an aggregate in General Discussion</title>
    <link>https://community.netapp.com/t5/General-Discussion/Powershell-command-to-list-disks-for-an-aggregate/m-p/444374#M1517</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You could try the invoke-ncsystemapi cmdlet with the command mentioned by &lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/73493"&gt;@Ontapforrum&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something like this:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;[Array]$command = @("set diag;storage", "disk", "partition", "show")
Try{
   $api = $("&amp;lt;system-cli&amp;gt;&amp;lt;args&amp;gt;&amp;lt;arg&amp;gt;" + ($command -join "&amp;lt;/arg&amp;gt;&amp;lt;arg&amp;gt;") + "&amp;lt;/arg&amp;gt;&amp;lt;/args&amp;gt;&amp;lt;/system-cli&amp;gt;")
   Write-Host $("Executed Command`: " + $([String]::Join(" ", $command)))
   $response = Invoke-NcSystemApi -Request $api -ErrorAction Stop
}Catch{
   Write-Warning -Message $("Failed Executing Command`: " + $([String]::Join(" ", $command))
   Break;
}
$response.results."cli-output"&lt;/LI-CODE&gt;&lt;P&gt;/Matt&lt;/P&gt;</description>
    <pubDate>Wed, 17 May 2023 12:38:08 GMT</pubDate>
    <dc:creator>mbeattie</dc:creator>
    <dc:date>2023-05-17T12:38:08Z</dc:date>
    <item>
      <title>Powershell command to list disks for an aggregate</title>
      <link>https://community.netapp.com/t5/General-Discussion/Powershell-command-to-list-disks-for-an-aggregate/m-p/444332#M1513</link>
      <description>&lt;P&gt;Does anybody know here a powershell command to list all the disks in an aggregate? ( disks could be partitioned or non-partitioned). I haven't been able to find such a command other than using a 7-mode command "aggr show -r". Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 09:49:16 GMT</pubDate>
      <guid>https://community.netapp.com/t5/General-Discussion/Powershell-command-to-list-disks-for-an-aggregate/m-p/444332#M1513</guid>
      <dc:creator>PerhapsCloud</dc:creator>
      <dc:date>2025-06-04T09:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell command to list disks for an aggregate</title>
      <link>https://community.netapp.com/t5/General-Discussion/Powershell-command-to-list-disks-for-an-aggregate/m-p/444339#M1514</link>
      <description>&lt;P&gt;PS C:\&amp;gt; Get-NcDisk&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are few more get-ncdisk* commands on page-31: (give it a try)&lt;BR /&gt;&lt;A href="https://www.netapp.com/pdf.html?item=/media/16861-tr-4475pdf.pdf" target="_blank"&gt;https://www.netapp.com/pdf.html?item=/media/16861-tr-4475pdf.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2023 11:08:37 GMT</pubDate>
      <guid>https://community.netapp.com/t5/General-Discussion/Powershell-command-to-list-disks-for-an-aggregate/m-p/444339#M1514</guid>
      <dc:creator>Ontapforrum</dc:creator>
      <dc:date>2023-05-16T11:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell command to list disks for an aggregate</title>
      <link>https://community.netapp.com/t5/General-Discussion/Powershell-command-to-list-disks-for-an-aggregate/m-p/444348#M1515</link>
      <description>&lt;P&gt;Thank you so much.&lt;/P&gt;&lt;P&gt;This command lists disks and their aggrs if the disks aren't partitioned. The aggr field is bland when disks are partitioned/shared. How to list those disks with aggr information in Powershell? Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2023 16:32:03 GMT</pubDate>
      <guid>https://community.netapp.com/t5/General-Discussion/Powershell-command-to-list-disks-for-an-aggregate/m-p/444348#M1515</guid>
      <dc:creator>PerhapsCloud</dc:creator>
      <dc:date>2023-05-16T16:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell command to list disks for an aggregate</title>
      <link>https://community.netapp.com/t5/General-Discussion/Powershell-command-to-list-disks-for-an-aggregate/m-p/444372#M1516</link>
      <description>&lt;P&gt;I don't know how to get that info via PS, but if you just need that info, you can get it directly from Ontap CLI from diag mode.&lt;/P&gt;&lt;P&gt;::&amp;gt;set diag&lt;BR /&gt;::*&amp;gt; storage disk partition show&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 10:14:32 GMT</pubDate>
      <guid>https://community.netapp.com/t5/General-Discussion/Powershell-command-to-list-disks-for-an-aggregate/m-p/444372#M1516</guid>
      <dc:creator>Ontapforrum</dc:creator>
      <dc:date>2023-05-17T10:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell command to list disks for an aggregate</title>
      <link>https://community.netapp.com/t5/General-Discussion/Powershell-command-to-list-disks-for-an-aggregate/m-p/444374#M1517</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You could try the invoke-ncsystemapi cmdlet with the command mentioned by &lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/73493"&gt;@Ontapforrum&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something like this:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;[Array]$command = @("set diag;storage", "disk", "partition", "show")
Try{
   $api = $("&amp;lt;system-cli&amp;gt;&amp;lt;args&amp;gt;&amp;lt;arg&amp;gt;" + ($command -join "&amp;lt;/arg&amp;gt;&amp;lt;arg&amp;gt;") + "&amp;lt;/arg&amp;gt;&amp;lt;/args&amp;gt;&amp;lt;/system-cli&amp;gt;")
   Write-Host $("Executed Command`: " + $([String]::Join(" ", $command)))
   $response = Invoke-NcSystemApi -Request $api -ErrorAction Stop
}Catch{
   Write-Warning -Message $("Failed Executing Command`: " + $([String]::Join(" ", $command))
   Break;
}
$response.results."cli-output"&lt;/LI-CODE&gt;&lt;P&gt;/Matt&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 12:38:08 GMT</pubDate>
      <guid>https://community.netapp.com/t5/General-Discussion/Powershell-command-to-list-disks-for-an-aggregate/m-p/444374#M1517</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2023-05-17T12:38:08Z</dc:date>
    </item>
  </channel>
</rss>

