Microsoft Virtualization Discussions

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

AllenChang
1,466 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
1,443 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
1,444 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