Mount-DiskImage Not assigining Drive letter

Welcome Forums General PowerShell Q&A Mount-DiskImage Not assigining Drive letter

This topic contains 4 replies, has 3 voices, and was last updated by

1 year, 6 months ago.

  • Author
  • #75208

    Points: 2
    Rank: Member

    Hi all

    I have an issue with PowerShell and the Mount-DiskImage cmdlet-it doesn't auto assign a drive letter when it mounts a VHD. If I use

    $Disk=Mount-DiskImage -ImagePath $VHD -PassThru 

    It will mount the VHD file but it will not assign a drive letter, nor does seem to even be attached.

    Attached : False
    BlockSize : 2097152
    DevicePath :
    FileSize : 55220109312
    ImagePath : Path to VHD
    LogicalSectorSize : 512
    Number :
    Size : 137067757568
    StorageType : 3
    PSComputerName :

    Any help would be appreciated.
    Thanks in advance

  • #75212

    Points: 30
    Rank: Member

    What OS are you using? Do you see your VHD mounted in Explorer? When I tested this with Windows 10 1703, I get the same output in the console (Attached = False), but when I check Explorer, I see the mounted VHD with a drive letter.

    • #75218

      Points: 2
      Rank: Member


      yes I am running 17.03 as well. I see it in Disk Management mounted but there is no drive letter assigned to it. I can assign a drive letter to it from DiskPart and from Disk Management but not from PowerShell as it it doesn't even return a ID for the disk number so I can't pipe it to the Get-Disk cmdlet

      Strange indeed.

  • #75223

    Points: 47
    Rank: Member

    If you open Diskpart as an administrator and type automount it will give the current policy. Setting this to enable i.e. automount enable should give any new VHD's a drive letter

    • #75298

      Points: 2
      Rank: Member

      I checked on the automount setting with DiskPart and it is set to enabled already.

      I have bypassed Mount-DiskImage and enabled Hyper-V Services so I can use Mount-VHD.
      The Mount-VHD command works as expected, I assume the Mount-DiskImage just does not work as I would expect it to.

      Thanks again!

The topic ‘Mount-DiskImage Not assigining Drive letter’ is closed to new replies.