Untitled

 avatar
unknown
plain_text
4 years ago
325 B
4
Indexable
get-vmswitch | where name -ne "Default Switch" | Remove-VMSwitch -force
foreach ($vm in $(get-vm)) {if (!($VM | Get-VMNetworkAdapter | ? Switchname -EQ "Default Switch")) {$VM | Add-VMNetworkAdapter -SwitchName "Default Switch"}}

get-vm | Get-VMNetworkAdapter | ? switchname -ne "Default Switch" | Remove-VMNetworkAdapter
Editor is loading...