The following functions can be used to retrieve (Get-RoundRobin) whether particular LUN IDs are using a Round Robin pathing policy. You can then set (Set-RoundRobin) a round robin pathing policy on the LUN IDs if your storage processor supports it.

Round Robin Pathing Policies from the VMware site

Round Robin (RR): Uses an automatic path selection rotating through all available paths, enabling the distribution of load across the configured paths. For Active/Passive storage arrays, only the paths to the active controller will be used in the Round Robin policy. For Active/Active storage arrays, all paths will be used in the Round Robin policy.

To run the scripts you will need your Vendor LUN ID or Device Display Name.
A LUN ID looks a bit like this:

naa.123456789…..

To retrieve a list of LUN IDs run the following command from an ESXi host;

	esxcli storage nmp device list
	

Note the Device Display Name for your vendor includes a naa.xxxxxxxx ID. Record the first 12 numbers after ‘naa’ as we will use this in the scripts.

Get-RoundRobin

	Function Get-RoundRobin() {  
		$vcenter=Read-Host "Enter a vCenter"
		Connect-vCenter $vcenter
		Write-Host "Connecting to $vcenter ..."
		Write-Host "Getting clusters available for $vcenter"
		Get-Cluster | Select-Object -Property Name | ft -HideTableHeaders
		$cluster=Read-Host "Enter a cluster name"
		Write-host "Finding <VENDOR_NAME> LUNs (naa.<VENDOR_ID_PATTERN>*) on hosts within cluster $cluster without a round robin pathing policy ... You may twiddle thumbs now."
		Get-VMHost -Location $cluster | Get-ScsiLun -CanonicalName "naa.<VENDOR_ID_PATTERN>*" | Select-Object -Property CanonicalName | where {$_.MultipathPolicy -ne "RoundRobin"} | measure-object -line
		Write-Host "Completed"
	}
	

Set-RoundRobin

	Function Set-RoundRobin() {
		$vcenter=Read-Host "Enter a vCenter"
		Connect-vCenter $vcenter
		Write-Host "Connecting to $vcenter ..."
		Write-Host "Getting clusters available for $vcenter"
		Get-Cluster | Select-Object -Property Name | ft -HideTableHeaders
		$cluster=Read-Host "Enter a cluster name"
		Write-host "Finding <VENDOR_NAME> LUNs (naa.<VENDOR_ID_PATTERN>*) on hosts within cluster $cluster without RR pathing policy and setting to round robin ... You may twiddle thumbs now."
		Get-VMHost -Location $cluster | Get-ScsiLun -CanonicalName "naa.naa.<VENDOR_ID_PATTERN>*<VENDOR_ID_PATTERN>*" | Where {$_.MultipathPolicy -ne "RoundRobin"} | Set-ScsiLun -MultipathPolicy RoundRobin
		Write-Host "Completed"
		Write-host "Finding LUNs without RR pathing policy"
		Get-VMHost -Location $cluster | Get-ScsiLun -CanonicalName "naa.<VENDOR_ID_PATTERN>*" | Where {$_.MultipathPolicy -ne "RoundRobin"}
		Write-Host "Completed"
	}
    

Connect-vCenter

	Function Connect-vCenter {
	Param(
        	[string]$vcenter
	)
        	# GET VSPHERE VCENTER CREDENTIALS
	        $creds=Get-Credential -Credential "<DOMAIN_CREDENTIALS>"
        	Connect-VIServer -Server $vcenter -Protocol https -Credential $creds -warningaction SilentlyContinue
	}
	

As a bonus, you can also set the IOPS to 1 on the PSP (Path Selection Policy).

Here is a ESXi command line one liner to GET the current iops set on a Round Robin PSP

	for i in `ls /vmfs/devices/disks | grep naa.<VENDOR_ID_PATTERN>|grep -v :`;do esxcli storage nmp psp roundrobin deviceconfig get --device=$i; done
	

Here is an ESXi command line one liner to SET the iops to 1 from the default of 1000 (check with your vendor before doing this) on a Round Robin PSP

	for i in `ls /vmfs/devices/disks | grep naa.<VENDOR_ID_PATTERN>` ; do esxcli storage nmp psp roundrobin deviceconfig set --device=$i --iops=1 --type=iops; done