# Changing the cluster settings is from http://communities.vmware.com/thread/414102, written by LucD # Function to display all clusters and then select one Function ChooseCluster{ $clusterlist = Get-cluster | Sort name $i = 0 write-host -foregroundcolor green `n "Choose a cluster" foreach ($clustername in $clusterlist){ write-host -foregroundcolor green "$i - $clustername" $i++ } [int]$answer = read-host `n "Enter the number for the cluster you want" $script:cluster = $clusterlist[$answer] if (($answer -gt $i-1) -or ($answer -lt 0)){write-host -foregroundcolor red "Input was not on the list. The script will exit now.";exit} } ChooseCluster foreach($esx in (Get-Cluster $cluster | Get-VMHost | Select $_.Name | Sort Name | Select -First 1 )){ Write-Host "Using $esx" Get-Datastore -VMHost $esx | %{ Get-ScsiLun -Datastore $_ | where {$_.MultiPathPolicy -eq "Fixed"} | Set-ScsiLun -MultipathPolicy RoundRobin -Confirm:$false } }