Trying to set the device status on the CD/DVD Drive 1 to be not connected, and not to connect at power on.
The following works on powered on VMs, but not powered off. I understand that the powered off state of a VM doesn't apply to the "connected" state. However what happens is that it errors, and doesn't change the "connect at power on" value for powered off VMs.
get-vm | get-cddrive | set-cddrive -connected $false -startconnected $false -confirm:$false
any help would be greatly appreciated.