PowerShell Logo Small


This is the built-in help made by Microsoft for the command 'Convert-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.


Converts the format, version type, and block size of a virtual hard disk file.


Convert-VHD [-Path] <String> [-DestinationPath] <String> [-AsJob] [-BlockSizeBytes <UInt32>] [-ComputerName <String[]>] [-DeleteSource] [-ParentPath <String>] [-Passthru]
[-VHDType <VhdType>] [-Confirm] [-WhatIf] [<CommonParameters>]

Search powershellhelp.space


The Convert-VHD cmdlet converts a virtual hard disk file by copying the data from a source virtual hard disk file to a new virtual hard disk file of a specified format and
version type. The format is determined by the file extension of the specified files, either .vhdx or .vhd. Conversion is an offline operation; the virtual hard disk must not
be attached when the operation is started.



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




Example 1

PS C:\>Convert-VHD –Path c:\test\testvhd.vhd –DestinationPath c:\test\testvhdx.vhdx

This example converts a source VHD to a destination VHDX. Because the format is determined by the file extension and the default type is determined by the source virtual
hard disk when no type is specified, the destination virtual hard disk will be a VHDX-format disk of the same type as the source virtual hard disk.

Example 2

PS C:\>Convert-VHD –Path c:\test\child1vhdx.vhdx –DestinationPath c:\test\child1vhd.vhd –VHDType Differencing –ParentPath c:\test\parentvhd.vhd

This example converts a source differencing disk of VHDX format to a destination differencing disk of VHD format that is connected to an existing parent disk.