Automount VHD Windows10

Note: This method utilizes PowerShell commands which work only when the Hyper-V feature is enabled. You need to activate Hyper-V on your PC to proceed.

To Automatically Mount VHD or VHDX File on Startup in Windows 10,

  1. Open Administrative Tools.
  2. Click the Task Scheduler icon.Administrative Tools Control Panel
  3. In the Task Scheduler library, click on the Create Task… link on the right.Windows 10 Create Task Link
  4. In Create Task dialog, fill in the Name box some meaningful text like “Automount of my VHD Drive”.Windows 10 Automount VHD Task Name
  5. Set the options as follows:
    – Configure for Windows 10.
    – Run whether user is logged on or not
    – Run with highest privileges boxWindows 10 Shutdown Event Task Options
  6. Switch to the Triggers tab and click on the New… button.Windows 10 Triggers Tab
  7. Set the Begin the task option to At startup.Windows 10 Automount VHD Task Trigger 1
  8. Select to the Actions tab, and click on the New button.Windows 10 Task Scheduler New Action Button
  9. In the Program/script text box type powershell.exe.Windows 10 Task Scheduler New Action PowerShell Exe
  10. Type the following in the Add arguments text box: Mount-VHD -Path "Full\path\to\your\VHD or VHDX\file". Change the Full\path\to\your\VHD or VHDX\file portion  to the actual full path of the VHD/VHDX file you want to have automatically mounted at startup.Windows 10 Automount VHD Task ActionWindows 10 Automount VHD Task Action Created
  11. Switch to the Conditions tab and disable the option Start the task only if the computer is on AC power.
  12. Click on the OK button to create the task.
  13. Type your user account password (or other administrative user account credentials).Windows 10 Save Credentials

You are done!

Notes:

  • If your VHD file is encrypted with BitLocker, you may need to add a delay to make a credential prompt appear after you sign in to Windows. Enable the Delay task for option on the New Trigger page, or edit the existing trigger. 30 Seconds should be enough.Windows 10 Automount VHD Task Trigger 2
  • You can disable this task to temporarily stop mounting your VHD/VHDX file at startup. You can re-enable it when needed.Windows 10 Automount VHD Disable Task
  • To permanently disable the VHD file auto-mount, delete your task under Administrative Tasks > Task Scheduler > Task Scheduler Library.Windows 10 Automount VHD Delete Task

That’s it.