Clone VM in Workstation 15 Pro via REST API using Powershell

After posting yesterday about modifying the parent image to allow for hostname changes, I was still looking for something a little more streamlined. I remember reading about the new REST API that is available on workstation, so I wrote a little script to use the Workstation API to clone a VM.

Also just FYI – this performs a full clone, not a linked clone. I’m not sure that linked clone functionality is available via the API yet. I’m hoping to use the vmrun command to accomplish this, and while I know it is packaged with Workstation Pro, the only documentation I can find for it is associated with Fusion. I also have been thinking about using vagrant for this as well.

This is very basic functionality, and exists simply to showcase the functionality. There’s no error checking, and it could be expanded a lot. Regardless, enjoy!

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright ยฉ 2024