select vdisk

Applies To: Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

selects the specified virtual hard disk (VHD) and shifts the focus to it.


This command is only applicable to Windows 7 and Windows Server 2008 R2.


select vdisk file=<full path> [noerr]  


Parameter Description
file= Specifies the full path and file name of an existing VHD file.
noerr Used for scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.


To shift the focus to the VHD named Test.vhd, type:

select vdisk file="c:\test\test.vhd"  

additional references