Related Articles

In this third part of article I will be continuing configuration of virtual machine network and moving it to another network. I have already generated Json and XML file with complete information which I used to migrate Esxi server from one vCenter to another vCenter with distributed virtual switch, and before esxi movement I will be using same XML file to change VM network from DVswitch to standards witch or vice versa. To view portgroup info from xml file use Import-Clixml command, This information is used in the script to change each VM network adapter settings portgroup.

I am running this ps1 script with below parameters-vCenter: This is vCenter name you are connecting, it prompts for username and password.-VirtualSwitch: If this parameter is not specified, by default takes standard switch name SvSwitch100, as same name standard virtual switch is created in earlier article Copy or clone distributed virtual switch portgroups to standard switch portgroups - Powercli.-XmlFile: This file is created in earlier article VMware Powercli : Gather distributed virtual switch information to JSON file to migrate standard switch, and I will be using same file to get remaining task done.

If I execute only .\Move-VMPortGroup.ps1 it prompts me for vCenter and xmlfile only. default VirtualSwitch name is taken automatically. If VM portgroup is moved successfully it shows green checkbox and incase of error shows red cross.