I noticed this message today when I ran the script:
Remove-VM - An item with the same key has already been added.
+ Get-VM -Name $newVMName | Remove-VM <<<< -DeletePeremanently -Confirm:$false
+ Category Info : NotSpecified: (:) [Remove-VM], ViError
+ FullyQualifiedErrorID : Client20_MoServiceImpl_Remove_SingleObject_ViError,VMware.VImAutomation.ViCore.Cmdlets.Commands.RemoveVM
The script does its job correctly though. What does this error mean?