November 06, 2019

List VMWare VM's with attached ISO's

Problem: I need to find all VM’s with ISO’s attached to the virtual CD-Roms.

Prerequisite: VMWare PowerCLI for PowerShell

Solution:

$vCenter = "YOURVCENTERHOSTNAME"
Import-Module VMware.VimAutomation.Core | Out-Null
Connect-VIServer -Server $vCenter | Out-Null

#The actual working code to list attached ISO's
Get-VM | Get-CDDrive | Where-Object { $_.IsoPath -ne $null } | Select-Object Parent, IsoPath | Format-Table -auto

Disconnect-VIServer * -Confirm:$false -Force -ErrorAction SilentlyContinue

Good Luck!!!

& Thank you to Adil Arif & Brian Graf : http://www.enterprisedaddy.com/2016/04/powercli-find-iso-attached-virtual-machines/


Please consider crypto tipping: