On Source Machine
You may want to sysprep the machine first, depending on what you are trying to do.
Insert WinPE Disk
net use z: \ServerD$ Pa$$word /USER:comain.localusername
Dism /Capture-Image /ImageFile:z:NewImage.wim /CaptureDir:C: /Name:”NewLaptop”
Exit
On Target Machine
net use z: \ServerD$ Pa$$word /USER:domain.localusername
Prepare the Disk(This wipes the whole disk and add one partition onyl)
select disk 0
clean
create partition primary
select partition 1
active
assign letter=”c”
format fs=ntfs label=”Windows” quick
exit
You could skip this step or amend it as needed to prepare the partition as required.
Apply the Image
dism /apply-image /imagefile:z:NewImage.wim /index:1 /applydir:c:
bcdboot c:Windows /s c: