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

How to show the size in TB or GB or MB ?

AllenChang
2,593 Views

When I use Get-NCvol and put it in  $vol

and then I use Write-Host $vol.totalsize

it always show in bytes

PS C:\Users\Administrator> $vol=get-ncvol svm1_root
PS C:\Users\Administrator> $vol.totalsize
20971520

How to show it in MB? or GB ?

1 ACCEPTED SOLUTION

NetApp_SR
2,570 Views

I found the below example online. Please test and let us know if it works.

 

List volume "VOL_NAME", size and size in GB.

Get-NcVol | where { $_.Name -like ‘*VOL_NAME*’} | FT name,TotalSize, {$_.TotalSize /1GB}

View solution in original post

1 REPLY 1

NetApp_SR
2,571 Views

I found the below example online. Please test and let us know if it works.

 

List volume "VOL_NAME", size and size in GB.

Get-NcVol | where { $_.Name -like ‘*VOL_NAME*’} | FT name,TotalSize, {$_.TotalSize /1GB}

Public