Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 220961

Re: Total Storage amount in datacenter

$
0
0

You could try something like this

Get-Datacenter|SelectName,
@{N="Storage Used (GB)";E={
 
$sum=Get-Datastore-Location$_|
 
where {$_.ExtensionData.Summary.MultipleHostAccess-and$_.Type-eq"VMFS"} |
 
Measure-Object-PropertyCapacityGB,FreeSpaceGB-Sum
  [
Math]::Round($sum[0].Sum-$sum[1].Sum,2)
}}

It will only take shared VMFS datastores into account.

If you use other datastore types you can change the Where-clause


Viewing all articles
Browse latest Browse all 220961

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>