I'm looking to create a PowerCLI script to clone a VM, and overwrite any existing clones that are present. Just doing some searching, here is what I found:
New-VM -Name VM2 -VM VM1 -Datastore datastorename -vmhost hostname
I have not tested the script yet, but it does look like it will do at least part of what I am looking to accomplish. Do I need to use the Datastore and VMhost parameters? And is there anything I can do to delete any existing clones before the script is run? Thank you.