1. 批量将虚拟机光驱摘除
$vms=get-vm
$vms.Name | ForEach-Object{
$cd = Get-CDDrive -VM $_
Set-CDDrive -CD $cd -NoMedia -Confirm:$false
}