Microsoft Virtualization Discussions

PowerShell Toolkit question - Get-NcVol

I have a homegrown script that produces space usage reports using PowerShell Toolkit's Get-NaVol cmdlet; specifically the SizeUsed field. However, as we're migrating to CDOT, the corresponding Get-NcVol cmdlet doesn't have a SizeUsed field - only TotalSize, Available, and Used, the latter of which is a percentage of total rather than an absolute number. My knowledge of PowerShell is rather rudimentary - how do I take a 'Get-NcVol -vserver $something' command, and return the total GBs/TBs used?


Re: PowerShell Toolkit question - Get-NcVol

That's because they embeded the volume attributes.. Check out get-ncvol | select *


You need to run something like this


 get-ncvol testvol | select @{n='used';e={convertto-formattednumber ($_.VolumeSpaceAttributes).sizeused datasize "0.0"}}


352.0 KB

View solution in original post

Re: PowerShell Toolkit question - Get-NcVol

Ah, I see. That explains it, thank you.

Cloud Volumes ONTAP
Review Banner
All Community Forums