Skip to content
Follow
Windows 🟡 Intermediate

How to Make VHD/VHDX Mount Automatically in Windows 11?

Richard
Written by
Richard
Aug 1, 2026 6 min read
How to Automatically Mount VHD or VHDX File at Startup in Windows 11
How to Automatically Mount VHD or VHDX File at Startup in Windows 11

Virtual hard disk files, known as VHDs and VHDXs, function as extra hard drives for your Windows 11 computer. These special files allow you to store data or install other operating systems, making them useful for virtual machines. Normally, Windows disconnects these virtual drives every time you restart your PC.

Virtual hard disk (VHD) or VHDX files require manual connection each time you access them, which can be a hassle. Windows allows you to automatically connect these drives when your computer starts. You can set up a simple task to attach the VHD or VHDX file, making it ready to use as soon as you log in.

⚡ Quick Answer

Open Task Scheduler, create a new task, and name it. Configure it to run with highest privileges at startup, then set the action to run PowerShell with the Mount-DiskImage command, specifying your VHD/VHDX file path.

Set Up Your Automatic VHD Connection Task

We will use a Windows tool called Task Scheduler. It helps automate tasks. We will guide you through each step.

Step 1Open Task Scheduler

First, open Task Scheduler. Press the ⊞ Win+R on your keyboard at the same time. This opens the Run box. Type taskschd.msc in the box and press Enter or click OK.

Step 2Create a New Task

In Task Scheduler, click on “Task Scheduler Library” in the left panel. Then, in the right panel under “Actions,” click “Create Task…”.

Create Task window in Task Scheduler for mounting VHDs.
Create Task window in Task Scheduler for mounting VHDs.

Step 3Name Your Task

Your Task Scheduler task needs a clear name, such as "Mount My VHD at Startup," for easy identification. You can add the full path to your VHD or VHDX file in the description box to specify which virtual disk this task manages, ensuring you can easily tell which virtual disk the task is for later.

In the "Description" box, you can type the full address (path) of the VHD or VHDX file you want to connect. This helps you know which virtual disk the task is for if you have many. For example, you could type:D:\MyVirtualDisks\ImportantData.vhdx

Step 4Set Up Automatic Running

⚠️Warning
To make sure your task runs automatically, select "Run whether user is logged on or not" and "Run with highest privileges" on the General tab. Running with highest privileges is key because connecting a virtual disk needs administrator rights.
  • Run whether user is logged on or not: This makes sure the task runs even when you are not logged in.
  • Run with highest privileges: This is important because connecting drives needs administrator permission. This box gives the task the needed rights.

In the "Configure for" dropdown menu, select Windows 10. This setting is often more compatible with these types of system tasks, even when running on Windows 11.

General settings for the new task to mount VHD at startup.
General settings for the new task to mount VHD at startup.

Step 5Choose When the Task Runs (Trigger)

Set your task to run automatically at startup by going to the Triggers tab and creating a new trigger. Select "At startup" from the "Begin the task" dropdown menu to ensure your VHD or VHDX file connects every time you turn on your PC.

Optional Delay: Sometimes, your computer might still be starting other programs when the task runs. If the task sometimes fails, you can add a delay. Check the "Delay task for" box and choose a short time, like 30 seconds or 1 minute. This gives your computer a moment to finish starting up.

After setting "At startup" (and a delay if you want), click "OK".

Trigger settings for the task to mount VHD on Windows startup.
Trigger settings for the task to mount VHD on Windows startup.

Step 6Choose What the Task Does (Action)

On the Actions tab, you'll tell Task Scheduler how to connect your virtual disk. Click "New..." and type "PowerShell" in the "Program/script" box. Then, in the "Add arguments" box, enter the command to mount your VHD or VHDX file.

In the "Action" window:

  • In the "Program/script" box, type PowerShell.
  • In the "Add arguments (optional)" box, type the command to connect your virtual disk:
💻Code
Mount-DiskImage -ImagePath 'Your\Full\Path\To\Your.vhdx'

Very Important: You MUST replace 'Your\Full\Path\To\Your.vhdx' with the actual, full address (path) of the VHD or VHDX file you want to connect. Keep the single quotes around the path. For example, if your file is at E:\Virtual Machines\MyData.vhdx, your command would look like this:

💻Code
Mount-DiskImage -ImagePath 'E:\Virtual Machines\MyData.vhdx'

After typing the command with your file path, click "OK".

⚠️Warning
Check the path carefully! A mistake here is the most common reason the task won't work. Make sure the file is really there.
Action settings for the task to mount VHD file automatically.
Action settings for the task to mount VHD file automatically.

Step 7Check Settings and Finish

Click the "Conditions" tab. You will see options about power. To make sure it works even when your computer is on battery, uncheck the box that says "Start the task only if the computer is on AC power." Click "OK" when you are finished with this tab.

Step 8Enter Your Password

Since you chose "Run whether user is logged on or not" and "Run with highest privileges," Windows needs to verify your identity. It will ask for the password for your current Windows account. Type it in and click "OK".

Step 9Check Your New Task

After setting up your task, check the main Task Scheduler window to confirm it's listed under "Task Scheduler Library." Your new task, like "Mount My VHD at Startup," should appear there, confirming it's ready to automatically connect your virtual drive when you restart your computer.

You have now set up your VHD or VHDX file to connect automatically every time you start your computer. When you restart your PC and log in, your virtual drive should be connected and ready to use in File Explorer.

Manage Your Automatic Task

The Task Scheduler Library allows you to manage your automatic VHD mounting. Right-click the VHD mounting task to disable it, preventing automatic runs, or enable it to turn automatic runs back on. Select "Properties" to change the VHD file path or other task settings.

  • Enable/Disable: To stop the VHD from connecting automatically, right-click your task in Task Scheduler Library and choose "Disable." To turn it back on, choose "Enable."
  • Edit: Need to change the VHD file path or other settings? Right-click the task and choose "Properties." This opens the same window where you set it up.
  • Delete: If you don't need automatic connection anymore, right-click the task and choose "Delete."

This small setup can save you a lot of time if you use VHD or VHDX files often. Enjoy the convenience!

Summary

This guide explains how to use Windows Task Scheduler to automatically connect your VHD or VHDX files at startup. By creating a task that runs at startup with administrator rights and uses a specific command, you can ensure your virtual disk is ready to use every time you turn on your PC.

How to permanently mount a VHD?

How to permanently attach a VHD: Actions for the task In the “New Action” window, type powershell.exe in the Program/script field. Then, in the “Add arguments (optional)” text field, type this command: Mount-DiskImage “Path to the VHD file”.

Was this guide helpful?

Tags: #Windows 11
Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

📚 Related Tutorials

How to Enable or Disable Show Snap Groups on Alt+Tab, Task View, and Taskbar in Windows 11
Windows How to Enable or Disable Show Snap Groups on Alt+Tab, Task View, and Taskbar in Windows 11
How to Enable or Disable “Last Active Click” on the Taskbar in Windows 11
Windows How to Enable or Disable “Last Active Click” on the Taskbar in Windows 11
How to Add or Remove File Types for Search Index in Windows 11
Windows How to Add or Remove File Types for Search Index in Windows 11
How to Enable or Disable Indexing File Contents by File Type in Windows 11
Windows How to Enable or Disable Indexing File Contents by File Type in Windows 11

No comments yet — be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked *