Set VMware Multipathing via PowerCLI


I wanted to apply ROUND ROBIN multipathing and set IOPS to 10 (as recommended by the vendors best practices) on each datastore in my cluster using a PowerCLI command.



First of all you can check the current multipathing

Get-Cluster {ENTER-CLUSTER-NAME} | get-vmhost | get-scsilun -CanonicalName "Naa*"



Then we can alter that statement to set the MultipathPolicy and CommandsToSwitchPath settings:

Get-Cluster {ENTER-CLUSTER-NAME} | get-vmhost | get-scsilun -CanonicalName "Naa*" | Set-ScsiLun -MultipathPolicy RoundRobin -CommandsToSwitchPath 10