Auto-Mount VHDx
Keep work separate
Disclaimer: Currently I am employed by Microsoft, but my views and thoughts are still my own. The reason I joined Microsoft was, the work Microsoft have been doing for last couple of years in Open Source Space. Today I am a advocate for Open Source representing Microsoft.
There are times when you need to mount VHD(x) when you login to Windows.
The easiest way I know is to run a task
at logon
:
General/Run with highest privileges: true
Trigger/Begin the task: At log on
Trigger/Settings/Specific User: <current user>
Trigger/Advanced Settings/Enabled: true
Action: Start a program
Action/Settings/Program: powershell.exe
Action/Settings/Add argument: Mount-DiskImage -ImagePath 'Full path of VHD or VHDX file'
More Info: How to Auto-Mount VHD or VHDX File at Startup in Windows 10
Update: From Windows 11 22H2, you are able to create Dev Drive, which will auto mount at logon.