I'm trying to find the right syntax to do the following;
1) Connect to vCenter
2) Select all hosts in maintenance mode
3) Select each LUN configured to use MRU or Fixed
4) Configure each LUN to use RoundRobin for the path selection policy
Connect-VIServer vCenterServerName.fqdn.com
Get-VMHost|Get-ScsiLun -LunType “disk”|where {$_.State -eq “Maintenance”}|where {$_.MultipathPolicy –ne “RoundRobin”}|Set-ScsiLun -MultipathPolicy “RoundRobin”}
If someone could confirm the syntax for me that would be brilliant.
The reason I want this script is because I need something simple that I can use to update a host or several at a time, that has recently been added or re-imaged to an environment where the storage Vendor recommendation is to use RR.
Cheers,
Paul