How do I eject/unmount an ISO file?

Jun 13, 2011 at 1:25 PM

How do I use the PowerShell Management Library for Hyper-V to eject or unmount an ISO file from the virtual machine's DVD drive?

Jul 20, 2011 at 7:22 AM

get-vm -running | get-vmdisk | where {$_.diskpath -eq "D:\temp\temp.iso" } | foreach {remove-vmDrive -diskonly -vm $_.vmelementName  $_.controllerId -L $_.driveLun}