Hi,
I am trying to find a way to change a VM's network connection from one Network Label to another.
Do you have any idea how can I do that?
The VM already exists.
Thank you
Yaniv
Here's how to do it using the toolkit:
Get-VM <vmname> | Get-NetworkAdapter | Set-NetworkAdapter -NetworkName <new network name>
[PowerShell MVP|https://mvp.support.microsoft.com/profile=5547F213-A069-45F8-B5D1-17E5BD3F362F], VI Toolkit forum moderator
Author of the upcoming book: Managing VMware Infrastructure with PowerShell
Co-Host, PowerScripting Podcast (http://powerscripting.net)
Need general, non-VMware-related PowerShell Help? Try the forums at PowerShellCommunity.org
Just edit the settings of the VM, choose the network adapter and select another network label for this nic.
Ricardo
Connect to the Virtual Center
Click on the VM you want to change
Click on "Edit Settings"
On the popup box click "Network Adapter"
Clear the check mark in the "connected box"
At the "Network label" box use the pull down menu to select the network connection you want and select it.
Put a check back in the "Connected box"
This will cause the VM to loose connection to the network. Be sure the network you select is the correct subnet for the VM. You may need to restart the network or reboot the VM depending on the OS.
Hope this help.
Here's how to do it using the toolkit:
Get-VM <vmname> | Get-NetworkAdapter | Set-NetworkAdapter -NetworkName <new network name>
[PowerShell MVP|https://mvp.support.microsoft.com/profile=5547F213-A069-45F8-B5D1-17E5BD3F362F], VI Toolkit forum moderator
Author of the upcoming book: Managing VMware Infrastructure with PowerShell
Co-Host, PowerScripting Podcast (http://powerscripting.net)
Need general, non-VMware-related PowerShell Help? Try the forums at PowerShellCommunity.org