Computer and Software Support


Detach 

DiskPart 

This is from Microsoft Technet. If you want to see it at their site, click here

To access DiskPart, click here

Applies To: Windows 7, Windows Server 2008 R2, Windows Server 2012 R2, Windows Server 2012, Windows 8

Stops the selected virtual hard disk (VHD) from appearing as a local hard disk drive on the host computer. When a VHD is detached, you can copy it to other locations.

Note: This command is only aplicable to Windows 7 and Windows Server 2008 R2.

Syntax: detach vdisk [noerr]

Parameters

noerr - Used for scripting only. When an error is encountered, DiskPat continues to process commands as if the error did not occur. Withuot this parameter, an error causes DiskPat to exit with an error code.

Remarks

  • A VHD must be selected and detached for this operation to succeed. Use the select vdisk command to select a VHD and shift the focus to it.

Example

To detach the elected VHD type:

detach vdisk