If I run my powershell script from the ISE it runs properly but if I run this as a stand-alone ps1 file I get the message
There is no disk in the drive. Please insert a disk into drive D:.
This happens if I insert a disk into drive d, then manually eject it before running the script. If I eject it through the drive's properties then I don't get this message and this or rebooting are the only ways to fix this that I have found.
If I set a breakpoint on the first line of the script, the message appears before the breakpoint so there is nothing I can do programatically within the script to stop this. Maybe in a shortcut that calls the script? In any case, I would not
want to force a disc eject as part of any solution. Hopefully there is a simple fix for this, oh and I don't have any access to registry settings either. Win7 enterprise version is our OS.
Thanks.