windowspowershellautomationscheduled-tasksstorage

Auto Mount .vhdx on Startup


I have a Surface Pro 4 with a 128 GB micro SD card to expand storage space. Sadly, Windows sees the SD card as a removable device and not a permanent hard drive, I did find a guide on how to work around this(See link below), however I am having trouble automatically mounting a .vhdx on startup. I created a .vhdx on the SD card, as the guide said, and want the .vhdx to mount on startup using task scheduler.


I have tried to use powershell and a .ps1 file to mount the .vhdx, however, this has not worked.

Mount-DiskImage A:\Fix.vhdx

Screenshot: Disk Management

I am following this guide: Configure Surface to use MicroSD as Primary Storage


Solution

  • According to your screenshot, Fix.vhdx is on I:.

    Mount-DiskImage I:\Fix.vhdx
    

    Note that, depending on your OS (Windows 8), you must be an Administrator to mount the disk. If you have the Hyper-V Cmdlets available, prefer ´Mount-VHD´.