Was already in the One Liners, but needed again. So slight variation.

After doing Connect-VIServer…

Get-VM | Where-Object {$_.PowerState -eq "PoweredOn"} | Get-CDDrive | Where-Object {$_.IsoPath -ne $null} | FT -AutoSize Parent, IsoPath

Or to export to csv



Get-VM | Where-Object {$_.PowerState -eq "PoweredOn"} | Get-CDDrive | Where-Object {$_.IsoPath -ne $null} | Select-Object -Property Parent, IsoPath | Export-Csv -Path .\iso-mounts.csv

Find connected CD-ROM on VMware via PowerCLI
Tagged on:     

Leave a Reply

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