VMware Cloud Community
chakoe
Enthusiast
Enthusiast
Jump to solution

Switch VM to another network

Hi,

i want to switch a VM from one Network to another ( both exist on the host).

I know that i have to use something like the Set-Networkadapter -Networkname...

But how do i build the oneliner?

Thx in advance!

Chakoe

0 Kudos
1 Solution

Accepted Solutions
ykalchev
VMware Employee
VMware Employee
Jump to solution

get-vm <VM-name> | get-networkadapter | set-networkadapter -NetworkName newNetwork

You can check Get-NetworkAdapter and Set-NetworkAdapter parameters and if they support values from the pipeline in the online help.

Regards,

Yasen

Yasen Kalchev, vSM Dev Team

View solution in original post

0 Kudos
1 Reply
ykalchev
VMware Employee
VMware Employee
Jump to solution

get-vm <VM-name> | get-networkadapter | set-networkadapter -NetworkName newNetwork

You can check Get-NetworkAdapter and Set-NetworkAdapter parameters and if they support values from the pipeline in the online help.

Regards,

Yasen

Yasen Kalchev, vSM Dev Team
0 Kudos