trying to migrate from dvPG to SPG
got a csv like this
dvPG SPG
dvPG-vlan1 vlan1
dvPG-vlan2 vlan2
how do I set-networkadapter and change the VMs on a vmhost from
from the dvPG to sPG?
maybe something like
import-csv "dvs.csv" -useculture | % {
get-vmhost vmhost | get-vm | get-networkadapter | set-networkadapter -networkname $spg -confirm:$false
}
BTW, vDS = dVS (in your thread title). They're the same thing, but vDS is the "correct" acronym.
yes sorry.
any idea how I can quickly change thevms from
dvpg-vlan1 to test-vpg-vlan1?
without csv?
trying something like
get-vmhost vmhost | get-vm | get-networkadapter | set-networkadapter -networkname test-$networkname
Have a look at William's post Automate the migration from Virtual Standard Switch to vSphere Distributed Switch using PowerCLI 5.5
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference