Thanks Luc. I spent a bit time on this last night. I run the one below.Exactly the same what you answered me.Today when i check the each devices Right click -> manage path > I still see "fixed" for "VMW_SATP_SYMM" .Am I missing smth on that ? Also I have a few RDMs. Shall I worry about them ? It is not about scripting but what would you do if you were me ?
$user = "root"
$pswd = "abc
$psp = "VMW_PSP_RR"
$satp = "VMW_SATP_SYMM"
$oldConfig = Get-PowerCLIConfiguration
Set-PowerCLIConfiguration -DefaultVIServerMode "Multiple" -Confirm:$false | Out-Null
connect-VIServer -server vcenter -username abc -password "password"
foreach($esx in Get-VMHost){
$esxConnect = Connect-VIServer -Server $esx.name -User $user -Password $pswd
$esxcli = Get-EsxCli -Server $esxConnect
$nmpdevicelist = $esxcli.nmp.device.list() | Where {$_.StorageArrayType -eq "VMW_SATP_SYMM"}
foreach($item in $nmpdevicelist){
$esxcli.nmp.device.setpolicy($null, $item.device, $psp) | Out-Null
$esxcli.nmp.roundrobin.setconfig($null, $item.device, 1, "iops", $null) | Out-Null
}
$esxcli.nmp.satp.setdefaultpsp($psp, $satp) | Out-Null
Disconnect-VIServer -Server
$esx.Name -Confirm:$false
}
Disconnect-VIServer -server vcenter -Confirm:$false
Set-PowerCLIConfiguration -DefaultVIServerMode
$oldConfig.DefaultVIServerMode -Confirm:$false | Out-Null
$esxcli.nmp.satp.setdefaultpsp($psp, $satp) | Out-Null
Disconnect-VIServer -Server
$esx.Name -Confirm:$false
}
Disconnect-VIServer -server vcenter -Confirm:$false
Set-PowerCLIConfiguration -DefaultVIServerMode
$oldConfig.DefaultVIServerMode -Confirm:$false | Out-Null
$esxcli.nmp.satp.setdefaultpsp($psp, $satp) | Out-Null
Disconnect-VIServer -Server
$esx.Name -Confirm:$false
}
Disconnect-VIServer -server vcenter -Confirm:$false
Set-PowerCLIConfiguration -DefaultVIServerMode
$oldConfig.DefaultVIServerMode -Confirm:$false | Out-Null