Permanently mount virtual disk on Windows Server

Solution 1:

It can be done with Task Scheduler:

  1. Create a new task with trigger “At Startup
  2. Add action “Start Program” with program name powershell.exe and arguments Mount-VHD -Path “\\server_name\folder\file.vhd”
  3. In general tab of task check the boxes “Run with highest privileges” and “Run whether user is logged on or not
  4. In general tab of task select the user, which is local admin and has read/write access to vhd file.