Detach the specified virtual disk. Syntax: DETACH VDISK NOERR NOERR For scripting only. When an error is encountered, DiskPart ...

    Detach the specified virtual disk.

Syntax:  DETACH VDISK [NOERR]

    NOERR       For scripting only. When an error is encountered, DiskPart
                continues to process commands as if the error did not occur.
                Without the NOERR parameter, an error causes DiskPart to exit
                with an error code.

    A virtual disk must be selected for this operation to succeed.

Example:

    DETACH VDISK