Tag Archives: set-cddrive

PowerCLI: List all vm’s with ISO mounted and dismount them

Easy-peasy and a pretty short post… To get all vm’s with iso mounted: Get-VM | Get-CDDrive | select @{N=”VM”;E=”Parent”},IsoPath | where {$_.IsoPath -ne $null} Then, to dismount those: Get-VM | Get-CDDrive | where {$_.IsoPath -ne $null} | Set-CDDrive -NoMedia -Confirm:$False

Posted in PowerCLI, Powershell, VMware Tagged , , , , ,