hm....points into the right direction, but i don´t know how to use this function...
My hope was, that there is a simple way like:
$hosts = Get-VMHost host61* | Sort-Object $_.Name | Select -ExpandProperty Name
foreach ( $singleesx in $hosts ) {
$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")
}
But this ony results in:
Message: vswitch0 is not a valid name for a virtual switch;
InnerText: vswitch0 is not a valid name for a virtual switchEsxCLI.CLIFault.summary
Bei C:\Users\j131670\AppData\Local\Temp\ddf3418c-79b0-4c6f-b6bb-3a69d6856a8d.ps1:5 Zeichen:37
+ $esxcli.network.vswitch.standard.set <<<< ("both","1500","vswitch0")
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : MethodInvocationException
But in fact, all these Switches exist on these Hosts...






