# Mount-DiskImage Not assigining Drive letter

**URL:** <https://forums.powershell.org/t/mount-diskimage-not-assigining-drive-letter/9036>\
**Category:** PowerShell Help\
**Created:** [July 18, 2017, 4:06pm UTC](https://forums.powershell.org/t/mount-diskimage-not-assigining-drive-letter/9036 "2017-07-18T16:06:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![teestar](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/teestar/32/364_2.png) [@teestar](https://forums.powershell.org/u/teestar)\
**Post date:** [July 18, 2017, 4:06pm UTC](https://forums.powershell.org/t/mount-diskimage-not-assigining-drive-letter/9036/1 "2017-07-18T16:06:57Z")

</div>

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  
Tim

---

<div class="post-metadata">

**Author:** ![matt-howard](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/matt-howard/32/247_2.png) [@matt-howard](https://forums.powershell.org/u/matt-howard)\
**Post date:** [July 18, 2017, 5:01pm UTC](https://forums.powershell.org/t/mount-diskimage-not-assigining-drive-letter/9036/2 "2017-07-18T17:01:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![teestar](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/teestar/32/364_2.png) [@teestar](https://forums.powershell.org/u/teestar)\
**Post date:** [July 19, 2017, 12:21am UTC](https://forums.powershell.org/t/mount-diskimage-not-assigining-drive-letter/9036/3 "2017-07-19T00:21:30Z")

</div>

Hi

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.

---

<div class="post-metadata">

**Author:** ![simbrook](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@simbrook](https://forums.powershell.org/u/simbrook)\
**Post date:** [July 19, 2017, 3:07am UTC](https://forums.powershell.org/t/mount-diskimage-not-assigining-drive-letter/9036/4 "2017-07-19T03:07:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![teestar](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/teestar/32/364_2.png) [@teestar](https://forums.powershell.org/u/teestar)\
**Post date:** [July 20, 2017, 1:10am UTC](https://forums.powershell.org/t/mount-diskimage-not-assigining-drive-letter/9036/5 "2017-07-20T01:10:23Z")

</div>

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!  
Tim

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:37pm UTC](https://forums.powershell.org/t/mount-diskimage-not-assigining-drive-letter/9036/6 "2024-05-16T20:37:51Z")

</div>

Closed on May 16, 2024, 8:37pm UTC


