powercli set-multipathpolicy
In big vmware environments with a lot off physical vmware servers it can be a pain in the ass to load balance the luns between the different hba’s. Especially when you have to use the fixed path policy and have an active/active san.
I always try to set all the even luns to the hba with an even number and all the odd luns to an hba with an odd number.
And of course there is the power of powershell to help you out here.
I have used the following script several times now.
I always love it to share things. So here is the script i used to set all even luns to hba0 and all odd luns to hba1. (depending on your esx environments the hba can also be hba1 and hba2). All kudos for this script go to rob mokkink because he made the original script.
There is also a blog at peetersonline.nl about setting multipath policies.
| you can download the script in txt here rename it to ps1 |

