Author Posts

April 4, 2016 at 10:54 am

I am a beginner...
Here is what I am trying to accomplish:
My problem is that $TotalTb, $AvailableTb and $Freetb have 2 entries so I am only getting the first entry in $Total,$Available,$Free divided.


April 4, 2016 at 11:37 am

I do not have a Nutanix environment to test, but this logic should work to get disk stats.

$id.usageStats | ForEach-Object {
        Capacity = "{0:N2}" -f ($_.'storage.capacity_bytes' / 1TB)
        Free = "{0:N2}" -f ($_.'storage.free_bytes' / 1TB)
        Usage = "{0:N2}" -f ($_.'storage.usage_bytes' / 1TB)