I upload the script updateVMDVPortgroup.pl, in this you can change the network of a vm to a existing DVPG, this script is based in the updateVMPortgroup.pl from William Lam.
It's use:
perl updateVMPortgroup.pl --vmname <vmname> --vnic <VNIC to change> --portgroup <DVPG name> --dvs <DVS name>
I use store credentials for login.-
Regards.-