Powershell – Using Powershell, how to eject an ISO image from a Hyper-V virtual machine

hyper-vpowershell

I'm using the Hyper-V module for PowerShell, and I've successfully mounted an ISO file onto a virtual machine. Question is: how do I eject (or unmount) it?

I'd prefer to use the PSHyperV stuff, if there's a solution. Failing that, dipping into WMI from PowerShell would be acceptable.

(Using Windows 2008 R2, if it makes a difference)

Best Answer

Set-VMDisk

HERE's a Powershell Hyper-V commandlet reference guide for future use.

Related Topic