- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could do something like this
$vm = Get-VM -Name MyVM
$rp = Get-ResourcePool -VM $vm
Remove-VM -VM $vm -DeletePermanently:$false -Confirm:$false
New-VM -VMFilePath $vm.ExtensionData.Config.Files.VmPathName -ResourcePool $rp -Confirm:$false
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference