Querying a vCenter for mounted ISOs on VMs using PowerCli


As we are retiring datastores that hosts ISOs, some are still in use (or just mounted) on VMs.

We can’t take these datastores offline until we figure out which VMs are consuming the datastore just for ISOs. As manually checking is going to take a lot of time, we will just run this via PowerCLI.

Start by connecting to PowerCLI using this guide.


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

You will get something like this:


Leave a Reply

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