typo! :-(
$hosts = Get-View -ViewType HostSystem | Sort-Object Name | Select -ExpandProperty Name
#$hosts = Get-VMHost * | Sort-Object $_.Name | Select -ExpandProperty Name
foreach ( $singleesx in $hosts ) {
Write-Host "Processing Host" $singleesx "...."
$esxcli = Get-EsxCli -VMHost $singleesx
$esxcli.network.vswitch.standard.set("both","1500","vSwitch0")
$esxcli.network.vswitch.standard.set("both","1500","vSwitch1")
$esxcli.network.vswitch.standard.set("both","1500","vSwitch2")
$esxcli.network.vswitch.standard.set("both","9000","vStorage")
}
works fine for me!
Thanks!