thx my mistake while coping Luc what i mean what is missing in the following script
$esxcli.storage.nmp.device.list()
$esxcli.storage.nmp.device.list($null)
Whole script what I want to do is
Add-PSsnapin VMware.VimAutomation.Core
$defaultpsp = "VMW_PSP_RR"
$psp = "VMW_PSP_RR"
$satp1 = "VMW_SATP_DEFAULT_AA"
Connect-VIServer -Server "vcenter" -User "xxx" -Password "xxx"
$esxhosts = get-cluster | Get-VMHost
foreach($esx in $esxhosts){
$esxcli = Get-EsxCli -VMHost $esx -ErrorAction SilentlyContinue
if($esxcli){
$nmpdevlist = $esxcli.storage.nmp.device.list() | Where {$_.StorageArrayType -eq $satp1}
foreach($dev in $nmpdevlist){
$esxcli.storage.nmp.device.set($null, $dev.device, $psp) | Out-Null
$esxcli.storage.nmp.psp.roundrobin.deviceconfig.set($null, $dev.device, 1, "iops", $null) | Out-Null
}
$esxcli.storage.nmp.satp.set($null, $defaultpsp, $satp1) | Out-Null
}
}
Disconnect-VIServer -Server "vcenter" -Confirm:$false