26 lines
860 B
PowerShell
26 lines
860 B
PowerShell
$output = @()
|
|
|
|
foreach ($cluster in Get-Cluster) {
|
|
$datastores = @()
|
|
foreach ($esxi in $cluster | get-vmhost) {
|
|
foreach ($datastore in $esxi | Get-Datastore){
|
|
$result = "" | Select Datastore,ESXi,Cluster
|
|
$result.Datastore = $datastore.Name
|
|
$result.ESXi = $esxi.Name
|
|
$result.Cluster = ($esxi | Get-Cluster).Name
|
|
$datastores += $result
|
|
}
|
|
}
|
|
$output += $datastores | Group-Object -Property Datastore | Where -FilterScript {
|
|
$_.Count -lt ($cluster | get-vmhost).Count
|
|
} | Select-Object -ExpandProperty Group
|
|
}
|
|
$output
|
|
|
|
$Title = "90 Cluster same Datastore"
|
|
$Header = "90 Cluster same Datastore"
|
|
$Comments = "Datastores in a Cluster are not configured on all Hosts."
|
|
$Display = "Table"
|
|
$Author = "evoila GmbH"
|
|
$PluginVersion = 1.0
|
|
$PluginCategory = "vSphere" |