Microsoft Virtualization Discussions

PowerShell Toolkit question - Get-NcVol

borismekler

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

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

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

borismekler

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

Announcements
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
Public