locked
Powershell There is no disk in the drive. Please insert a disk into drive D: RRS feed

  • Question

  • 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.

    • Moved by Bill_Stewart Monday, October 27, 2014 2:30 PM Unanswerable drive-by question
    Monday, August 11, 2014 3:41 PM

All replies

  • It sounds like you need to fix your computer.  We cannot help you with that.

    Perhaps you should ask you desktop support people for help.


    ¯\_(ツ)_/¯


    • Edited by jrv Monday, August 11, 2014 4:15 PM
    Monday, August 11, 2014 4:14 PM