AutoUnattend.xml

19.10.11 David Segura

When using New-OSDDisk, I you should RunSynchronousCommand in the windowsPE settings pass with the following Path

PowerShell -Command "& {Start-Transcript | Out-Null;New-OSDDisk -Confirm -SelectDisk -Force;Stop-Transcript;Sleep -S 5}"

It should look something like this

<RunSynchronousCommand wcm:action="add">
<Order>4</Order>
<Description>New-OSDDisk</Description>
<Path>PowerShell -Command "& {Start-Transcript | Out-Null;New-OSDDisk -Confirm -SelectDisk -Force;Stop-Transcript;Sleep -S 5}"</Path>
</RunSynchronousCommand>

The examples below will show what different Disk configurations look like with the AutoUnattend.xml

BIOS MBR | 1 Disk | RAW

In this example, the only thing I had to press was P to Partition the Disk as it didn't need cleaning. Keep in mind the Transcript display was my doing to show where the file was. That can be left out or even hidden

And here are the Partitions ready for Windows Setup

BIOS MBR | 1 Disk | Existing Data

Unlike the RAW disk in the previous example, this had to have the Disk cleaned so there was an additional Confirm prompt