Attaches the specified virtual disk. Syntax: ATTACH VDISK NOERR READONLY { SD= | USEFILESD } NOERR For scripting only. When ...

    Attaches the specified virtual disk.

Syntax:  ATTACH VDISK [NOERR] [READONLY] { [SD=] | [USEFILESD] }

    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.
                
    READONLY    Attaches the virtual disk as read-only. Any write operation 
                will return an input/output device error.

    SD=
    
                Specifies a security descriptor in the security descriptor
                definition language (SDDL) format.  By default the security
                descriptor allows access like any physical disk. For more
                information on the SDDL please see the CREATE VDISK command.
                
                
    USEFILESD   Specifies that the security descriptor on the virtual file 
                itself should be used on the virtual disk.  If not specified,
                the disk will not have an explicit security descriptor unless
                specified with SD=(SDDL string).
 
    A virtual disk must be selected for this operation to succeed.

Example:

    ATTACH VDISK
    ATTACH VDISK READONLY
    ATTACH VDISK USEFILESD