Diskpart Create UEFI Partitions

diskpart /s drive:\CreatePartitions.txt


select disk 0
clean
convert gpt
rem == 1. System partition =========================
create partition efi size=100
rem ** NOTE: For Advanced Format 4Kn drives,
rem ** Change this value to size = 260 **
format quick fs=fat32 label="System"
assign letter="S"
rem == 2. Microsoft Reserved (MSR) partition =======
create partition msr size=16
rem == 3. Windows partition ========================
rem == a. Create the Windows partition ==========
create partition primary
rem == b. Create space for the recovery tools ===
shrink minimum=500
rem ** NOTE: Update this size to match the
rem size of the recovery tools
rem (winre.wim) **
rem == c. Prepare the Windows partition =========
format quick fs=ntfs label="Windows"
assign letter="W"
rem === 4. Recovery tools partition ================
create partition primary
format quick fs=ntfs label="Recovery tools"
assign letter="R"
set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
gpt attributes=0x8000000000000001
list volume

dism using .bat


set image=%~dp0Win10.wim
Dism.exe /apply-image /imagefile:%image% /index:1 /ApplyDir:W:\

Diskpart

This is for reference only:
* Change commands to suit your needs.
diskpart /s f:\diskpart.txt
Or manually:

> diskpart
> list disk
> select disk 0 (usually 0, which is the disk you want to image)
> clean
> list volume
> select volume 1 (drive C)
> delete volume
> create partition primary (This is will the default size left, or you could specify ex: create partition primary size=80000
> list partition
> select partition 1 (The newly created partition)
> format fs=ntfs quick
> active
> assign letter=c
> exit


cd TechTools
> imagex /apply source:\C.wim 1 C: