Get-View -ViewType Datastore | %{
$_ | Select Name,
@{N="Location";E={$_.Summary.Url}},
@{N="Type";E={$_.Summary.Type}},
@{N="Hosts Connected";E={$_.Host.Count}},
@{N="VMs Connected";E={$_.Vm.Count}},
@{N="Capacity";E={"{0:n2} GB"-f ($_.Summary.Capacity/1GB)}},
@{N="Provisioned";E={"{0:n2} GB"-f (($_.Summary.Capacity - $_.Summary.FreeSpace + $_.Summary.Uncommitted)/1GB)}},
@{N="Free";E={"{0:n2} GB"-f ($_.Summary.FreeSpace/1GB)}}
} | Export-csv ("c:\VMreports\Datastore-"+$a+".csv")
No comments:
Post a Comment