getting driveletter of mounted iso over network RRS feed

  • Question

  • I have a problem with getting driveletter of a mounted ISO over network. I have used 'Mount-DiskImage –ImagePath $ISOPATH' 

    for mounting. When i mounted ISO file, which was locally stored on disk D:\, i had no problem with getting the volume information via powershell: 'Get-DiskImage -ImagePath $ISOPATH | Get-Volume'.  This is how the script looks like:

    Mount-DiskImage –ImagePath $ISOPATH 
    $driveletter = (Get-DiskImage -ImagePath $ISOPATH | get-volume).driveletter + ":"
    cd $driveletter\Nanoserver  

    Above code works fine with mounted local ISO file.

    However, when ISO file was mounted from a network share, the Get-Volume command no longer work. It doesn't see the newly mounted drive, despite the fact that its visible and accessible via windows explorer. Command: 'Get-DiskImage -ImagePath $ISOPATH | Get-Volume '

    no longer show any information, instead its showing nothing, blank result. The only way that i see this drive via powershell is by using Get-PSdrive command, however, its hard for me to get the letter in automated way with this command. Has anybody got solution to this problem?

    I gladly provide any more information if required. Thanks

    • Edited by konpro11 Friday, September 8, 2017 9:00 AM
    Friday, September 8, 2017 8:58 AM


All replies

  • Hi,

    well, you can ask for your virtual cdrom drives instead:

    (Get-CimInstance -Query "SELECT * FROM win32_cdromdrive WHERE DeviceID LIKE '%PROD_VIRTUAL_DVD-ROM%'").Drive


    There's no place like

    Friday, September 8, 2017 9:13 AM
  • You cannot remotely access drives mounted to a user session.  An ISO is mounted to a user session.


    Friday, September 8, 2017 9:41 AM