Currently the Set-CDDrive is accepting any path, whether the path is valid or not.
It is only when you try to connect that you get an error message :
Set-CDDrive Server task failed: Connection control operation failed for disk 'ide0:0'. Connection control operation failed for disk 'ide0:0'
This error message doesn't really help you to find out the path to the ISO file is wrong and we are losing time searching for other reasons...
My suggestion is to validate the IsoPath parameter so that we are immediately aware that it is correct or not.