diff --git a/VMware/vCheck/vSphere/90 DRS hostgroup.ps1 b/VMware/vCheck/vSphere/90 DRS hostgroup.ps1 new file mode 100644 index 0000000..100e9af --- /dev/null +++ b/VMware/vCheck/vSphere/90 DRS hostgroup.ps1 @@ -0,0 +1,27 @@ +$hostswithout = @() + +foreach ($cluster in Get-Cluster) { + #check ob eine drs gruppe definiert ist + if ((Get-DrsClusterGroup -Cluster $cluster).Count -ge 1) { + #min eine drs group vorhanden! + foreach ($esx in (Get-Cluster $cluster | Get-VMHost )) { + #check ob host nicht in einer drs gruppe ist + if ((Get-DrsClusterGroup -Cluster $cluster).Member.Name -notcontains $esx.Name) { + $result = "" | Select Name, Cluster + $result.Name = $esx.Name + $result.Cluster = Get-Cluster -VMHost $esx + $hostswithout += $result + } + } + } +} + +$hostswithout + +$Title = "90 DRS Hostgroup" +$Header = "90 DRS Hostgroup" +$Comments = "The following Hosts are not in a hostgroup" +$Display = "Table" +$Author = "evoila GmbH" +$PluginVersion = 1.0 +$PluginCategory = "vSphere" \ No newline at end of file