Microsoft Virtualization Discussions

PowerShell Toolkit question - Get-NcVol

borismekler
6,395 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
6,390 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
6,391 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
6,382 Views

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

Public