PowerShell: List VM's that are not clustered
Before you continue please consider clicking on one of the horrible ads. I know they are a pain but they help me pay for the hosting of this site. It owes me a lot of money. Sob story over.
A short one for you. If you have a few hundred VM's in a cluster and need to find out if any host contain VM's that are not clustered.
#Get the Hyper-v hosts in the cluster
$ClusterNodes = Get-ClusterNode
#Get all VM's
$AllVMs = @()
foreach($ClusterNode in $ClusterNodes)
{
$AllVMs = $AllVMs + (get-vm -ComputerName $ClusterNode)
}
#list VM's that are not clustered
$AllVMs | where {$_.IsClustered -eq $False}
This will help. Enjoy.