Summary: Use Windows PowerShell to eject the DVDs from a group of virtual machines.
How can I eject any mounted DVDs from a group of virtual machines that are running Hyper-V in Windows Server 2012?
Use the Set-VMDvdDrive cmdlet and set the path to $null:
$name = "Client1","Server1","Server2"
$name | Foreach {Set-VMDvdDrive -VMName $_ -Path $null}