VMware: Find Connected ISO’s

KB ID 0001708


If you want to search your VMware estate to find VMs that have connected CD/DVD ISO files, then here are your best two options;

Option 1: Use PowerCLI

Whilst connected to your virtual infrastructure (Connect-VIServer) issue the following command;

Get-VM | FT Name, @{Label="ISO file"; Expression = { ($_ | Get-CDDrive).ISOPath }}

Option 2: Use PowerCLI

If you don’t already have RVTools then get it downloaded! One of the many cool things it does, is show ISO data. (On the vCD tab).

Ejecting All Connected VMware ISO files.

If you want to eject all those ISO files you can use the following PowerCLI syntax;

Get-VM | Get-CDDrive | where {$_.IsoPath -ne $null} | Set-CDDrive -NoMedia -Confirm:$False

Note This will not work if a VM is powered off, and you will see a “The operation is not allowed in the current state.” error.

Related Articles, References, Credits, or External Links


Author: PeteLong

Share This Post On

Submit a Comment

Your email address will not be published. Required fields are marked *