ganapa2000
Hot Shot
Hot Shot

Check Duplicate VM across cluster

Hi,

How can I check the duplicate VM Names across two different clusters ? Please help!!

$vmTab = @{}
foreach($vm in Get-VM){
$vm | where {$_.Name} | %{
if($vmTab.ContainsKey($_.Name)){
Write-Host "Duplicate VM Found" $_.Name "in" $vm.Folder "and" $vmTab[$_.Name]
} else {
$vmTab[$_.Name] = $vm.Folder
}
}
}

Reply
0 Kudos