NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Microsoft Virtualization Discussions

PowerShell Toolkit question - Get-NcVol

borismekler
7,956 Views

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?

1 ACCEPTED SOLUTION

JGPSHNTAP
7,951 Views

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"}}

 

used
----
352.0 KB

View solution in original post

2 REPLIES 2

JGPSHNTAP
7,952 Views

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"}}

 

used
----
352.0 KB

borismekler
7,943 Views

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

Public