Try something like this
$vmName = <vmname> $newUuid = <new-uuid> $spec = New-Object VMware.Vim.VirtualMachineConfigSpec $spec.uuid = $newUuid $vm = Get-VM -Name $vmName $vm.Extensiondata.ReconfigVM_Task($spec)
Note that this the call to the method in it's simplest form, no waiting for task completion, no error checking.
Blog: LucD notes
Thanks..I wrapped it up in a loop to go through a hosts's VM, and added a random pseudo-random GUI generator.
So I wrote a blog about my UUID problem, and posted the script that automatically creates unique UUIDs for all VMs on a ESX host. You can check out my blog post at: