Here's an example of adding this to an AutoUnattend.xml. In this example, I have added some Parameters
I've also added a Transcript which saves to X:\Sources by default, and a Sleep timeout of 5 seconds so I can get a screenshot
<RunSynchronousCommand wcm:action="add">
<Order>4</Order>
<Description>New-OSDDiskWinPE</Description>
<Path>PowerShell -Command "& {Start-Transcript|Out-Null;New-OSDDiskWinPE -SSU 500MB -SR 800MB -LO OSDeploy;Stop-Transcript;Sleep -S 5}"</Path>
</RunSynchronousCommand>
This is what it looks like during RunSynchronousCommand processing
And the Partitions in Windows Setup