Creates a virtual disk file. Currently only VHD format files are supported. Syntax: CREATE VDISK FILE= MAXIMUM= TYPE={FIXED|EXPANDABLE} ...

    Creates a virtual disk file. Currently only VHD format files are supported.

Syntax:  CREATE VDISK FILE=<"filename"> MAXIMUM= [TYPE={FIXED|EXPANDABLE}]
             [SD=] [PARENT=<"filename">] [SOURCE=<"filename">]
             [NOERR]

    FILE=<"filename">

                Specifies the complete path and filename of the virtual disk
                file.  The file may be on a network share.
                
    MAXIMUM= The maximum amount of space exposed by the virtual disk, in
                megabytes (MB).

    TYPE={FIXED|EXPANDABLE}

                FIXED specifies a fixed size virtual disk file.  EXPANDABLE 
                specifies a virtual disk file that resizes to accommodate 
                the allocated data.  The default is FIXED.

    [SD=]
    
                Specifies a security descriptor in the security descriptor
                definition language (SDDL) format.  By default the security
                descriptor is taken from the parent directory. 

                SDDL strings can be complex but flexible. In its simplest
                form, a security descriptor that protects access, is known as
                a discretionary access control list (DACL). It is of the form:
                
                D:()()...()
 
                Common DACL_FLAGS are:
                
                   "P" - The DACL should not be overiden 
                         (protected) by any ACLs from parent containers.
                         The container for a VHD file is its directory.
                   "AI"- The DACL should auto-inherit from the parent 
                         container.

                STRING_ACEs are of the form
               
                   ;;;;;
   
                Common ACE_TYPEs are:
               
                   "A" - Allow access.
                   "D" - Deny access.

                Common RIGHTS are:
               
                   "GA" - All access.
                   "GR" - Read access.
                   "GW' - Write access.

                Common ACCOUNT_IDs are: 

                   "BA" - Built in administrators
                   "AU" - Authenticated users.
                   "CO" - Creator owner.
                   "WD" - Everyone.

                Putting all this together, for example,

                  D:P:(A;;GR;;;AU)

                gives read-access to all authenticated users.

                Similarly,
                
                  D:P:(A;;GA;;;WD)
                  
                Gives everyone full access.
               
                Further information on the SDDL can be found
                on Microsoft's MSDN website.
    
    [PARENT=<"filename">]

                Path to an existing parent virtual disk file to create a 
                differencing disk. With the PARENT parameter, MAXIMUM should 
                not be specified because the differencing disk gets the size 
                from its parent. Also, TYPE should not be specified since only 
                EXPANDABLE differencing disks can be created.
                

    [SOURCE=<"filename">]
    
                Path to an existing virtual disk file to be used to 
                pre-populate the new virtual disk file. When SOURCE is 
                specified, data from the input virtual disk file is copied
                block for block from the input virtual disk file to the 
                created virtual disk file.  There is no parent-child 
                relationship established however.


    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.
Example:

    CREATE VDISK FILE="c:	est	est.vhd" MAXIMUM=1000
    CREATE VDISK FILE="c:	est\child.vhd" PARENT="c:	est	est.vhd"
    CREATE VDISK FILE="c:	est	est.vhd" MAXIMUM=1000 SD="D:P(A;;GA;;;WD)"
    CREATE VDISK FILE="c:	est
ew.vhd" SOURCE="c:	est	est.vhd"