Automation
Now let's put this all together in with some Automation
AutoUnattend.xml
Everything can be added to an AutoUnattend.xml in three separate Commands
Execution Policy
The Execution Policy must be run first as the OSD Module will not be imported without having this done first. We know this works properly, so -WindowStyle Hidden
will be used to hide the console
Add Modules
The second Command will update the OSD Module and add additional Modules. This must be kept separate so additional Run Commands that are in additional steps will use the updated Modules. This window will be kept visible and a Pause will be added. Verbose output is recommended
Commands
Finally, all the other settings can be put together in the third command. Again, Verbose and a Pause will help for the test
Execution
The first console that we see is to add the Modules. Press Enter to continue
The second one is for the settings. Press Enter to continue
Full Automation
Once we verify that everything looks good, the Windows can be Hidden, and we can even use PowerShell Transcripts to see how things went. To fully automate everything, simply use the following commands in the AutoUnattend.xml
And this is the result, looks like nothing happened. Microsoft DaRT Remote Recovery will be accessible by pressing ALT + TAB
A closer look shows that everything is set properly
PowerShell Transcripts are saved in X:\Sources if you want a closer look
Last updated