PowerShell Logo Small

Mount-VHD



This is the built-in help made by Microsoft for the command 'Mount-VHD', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Mounts one or more virtual hard disks.

SYNTAX


Mount-VHD [-Path] <String[]> [-ComputerName <String[]>] [-NoDriveLetter] [-Passthru] [-ReadOnly] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Mount-VHD cmdlet mounts one or more virtual hard disks.



<

RELATED LINKS


Online Version: http://go.microsoft.com/fwlink/?LinkID=306891

REMARKS

<

Examples


Example 1

PS C:\>Mount-VHD –Path c:\test\testvhdx.vhdx



Mounts a virtual hard disk where the path to the virtual hard disk file is c:\test\testvhdx.vhdx.




Example 2

PS C:\>Mount-VHD –Path c:\test\testvhdx.vhdx -ReadOnly



Mounts a virtual hard disk in read-only mode where the path to the virtual hard disk file is c:\test\testvhdx.vhdx.




Example 3

PS C:\>Mount-VHD –Path c:\test\testvhdx –PassThru | Get-Disk | Get-Partition | Get-Volume



Attaches a virtual hard disk to the system where the path to the virtual hard disk file is c:\test\testvhdx.vhdx, and gets the volumes associated with it.