I have a sneaking suspicion that this may be a bug, but I'm definitely willing to entertain the possibility that I'm doing things wrong.

I have a VMware virtual machine in $vm, and I'm trying to assign a boot CD for it. $vm is powered off.

The documented method seems pretty straightforward:

Set-CDDrive -CD (Get-CDDrive -vm $vm) -IsoPath "[datastorename] \whatever.iso" -StartConnected 1

Now, when I start the VM, it immediately tries to PXEboot. I turn off the machine, and in the vSphere client, I edit the VM's properties, go to "CD/DVD drive 1", and verify, "Device Status" has a checkmark next to "Connect at power on".

Here's the crazy thing. When I uncheck that box, then check it again, then start the VM, it boots from the ISO.

I've done it again and again, with the console open, with it closed, and every time, I can set the StartConnected flag on the CLI, and the GUI reflects the setting, but only after I mark the checkbox manually does it actually boot from the ISO.

Is there a step that I'm neglecting to perform in PowerCLI to get this setting to "take"?