Get-VM | Where-Object { (Get-CDDrive -VM $_).ConnectionState.Connected }
Author of the upcoming book: Managing VMware Infrastructure with PowerShell
Co-Host, PowerScripting Podcast (http://powerscripting.net)
My signature used to be pretty, but then the forum software broked it. vExpert. Microsoft MVP (Windows PowerShell). Author, Podcaster, Speaker.
I'm @halr9000