Total sizes of aggrs and all disks..

Ok, so i either have a brainfreeze or there isn't an easier way to do this.

basically, sum up all the aggregates total, available and sum up total raw capacity. 

Total size =  ([system.math]::floor((get-naaggr | measure -sum Totalsize).sum/1gb))

Total Available = ([system.math]::floor((get-naaggr | measure -sum available).sum/1gb))

Raw Disk =  ([system.math]::floor((get-nadisk | ? {$_.status -ne "partner"} | measure -sum usedspace).sum/1gb))

Is this the only way?

Re: Total sizes of aggrs and all disks..

One more, total volumes allocated - ([system.math]::round((get-naaggrspace | measure -sum sizevolumeallocated).sum/1gb,2))

I assume that adds up thin provisioned as well, i'm going to check that in the lab