- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Is there any possibility to add a line into the below script in order to show datastore I/O value in real time ?
$esxiHosts = Get-VMHost
$esxiClusters = Get-Cluster
$data = @()
foreach ($esxiHost in $esxiHosts) {
$esxiHostName = $esxiHost.Name
$datastores = Get-Datastore -VMHost $esxiHost
$esxiCluster = ($esxiHost | Get-Cluster).Name
foreach ($datastore in $datastores) {
$data += [PSCustomObject]@{
"ESXi Host" = $esxiHostName
"Datastore" = $datastore.Name
"Cluster" = $esxiCluster
"Size (GB)" = $datastore.CapacityGB
"Free Space (GB)" = $datastore.FreeSpaceGB
"Storage Array" = $datastore.ExtensionData.Info.Url
}
}
}
$data | Format-Table -AutoSize
Thanks
Hamdi