Microsoft Virtualization Discussions

Powershell Code to return Storage Data info


Hi All


Firstly I've never used any of the NetApp Powershell commandlets.

Developing a script here to do some estate reporting, (while we have multiple tools they all output in different formats and either show too much or not enough info !!)


So what am I trying to do..


  • Aggregate Name. Overall Capacity / used space / free space / Over committed %
  • Volume Name. Used space / free space dedupe and compression stats.
  • LUN Name. Used space / free space

Any one have some example code I can work with as I'm really unsure where to start.


Cheers in advance




For aggregate info use "Get-NcAggr"


Connect-NcController {ipaddress}


$aggr = Get-NcAggr -Name {aggregate name in list}

$aggr | format-list


...if you need more detailed info then drill into any of the 'DataONTAP.C.Types' objects you see listed...

$aggr.AggrSpaceAttributes reference specific properties use $aggr.{propertyname} to retrieve the value







For Volume info use Get-NcVol and for LUNs use Get-NcLun, and do the same drill downs as in the Get-NcAggr example above to find the needed values...and use tab completion when drilling down into the objects - makes it a LOT easier than all that typing 😉


NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner