In the beta toolkit announcement on the blog, there was a code snippet that I use.
This will list them...
Connect-VIServer -server SERVER_NAME -protocol https ;
get-vm | where { $_ | get-cddrive | where { $_.ConnectionState.Connected -eq "true" } } | select Name;
This will disconnect them...
Connect-VIServer -server SERVER_NAME -protocol https ;
Get-VM | Get-CDDrive | where { $_.ConnectionState.Connected -eq "true" } | Set-CDDrive -Connected:$FALSE -Confirm:$FALSE
Because we have multiple environments where I work, I made a script with a menu.
Steven Peck
Message was edited by: sepeck -removed site specific names