The only solution I can think of right now, is to check inside the guest OS (Invoke-VMScript or Get-WmiObject) if there is a CD/DVD mounted, and if it is unmount it.
The disadvantage is that this requires VMware Tools on all VMs (which you should have in any case Image may be NSFW.
Clik here to view.) and that the guest OS is supported by Invoke-VMScript.