How to Change the Default Pathing Policy of an ESXi Host with PowerCLI Script?

Below is the PowerCLI scipt to change the multipathing policy for an ESXi Host.

NOTE: Please try testing this script first in a test environment before trying in Production. We do not take any responsibility for any issues if directly run in Production.

$esxcli = Get-EsxCli -VMHost “YourESXHostname” -V2

#use V2 option for Get-EsxCli, the possibilities are extended and it is easier to use in PowerCLI 6.3

# Help on the parameters


# List the parameters in a hash table


# Fill the hash table (optional params are not required)

$sRule = @{

satp = ‘VMW_SATP_ALUA’

psp = ‘VMW_PSP_RR’

‘psp-option’ = ‘iops=1’

claimoption = ‘tpgs_on’

vendor = ‘3PARdata’

model = ‘VV’

description = ‘HPE 3PAR Custom Rule’


# Call the esxcli command




Source : VMTN Community.

You may also like...

Leave a Reply

%d bloggers like this: