Dear all,
I require a script which checks the path policy of all datastores in a vcenter.
Also it needs to change the path policy to round robin, if it is not set to round robin already.
I have written a script for the same. But this requires manual feeding of esxi hosts names and also the script is very slow.
Please help.
MYSCRIPT:
ForEach ($Server in Get-Content ("Servers.txt") )
{
Get-VMHost $Server | Get-ScsiLun -LunType "disk" |where {$_.MultipathPolicy -ne "RoundRobin"}|Set-ScsiLun -MultipathPolicy RoundRobin
Write-output “Completed on” $Server >> outputresolved.csv
}