Links

Custom OSDCloud

I realize there is a need to customize the OSDCloud defaults, especially when you have to keep repeating things (OSLanguage, OSBuild, OSEdition, etc). Without setting these somehow, there is an entry point for making mistakes due to lack of consistency.
This is easily demonstrated in a post from my good virtual friend Sune Thomsen in his tweet below. One of my hopes has been to see what the Community does with OSDCloud, and he didn't disappoint. He took the ball and ran with it, and shared his experience.
While I did Like and Comment on his Tweet because he solved a problem that he had, I didn't entirely agree with his methods for a couple of reasons

Hardcoding

This makes things a challenge when you want to make changes. For example, if this method were used in an Enterprise, any changes to the settings (like when the OSBuild needs to change) would need a full rebuild. Can you guarantee that everyone's USB sticks have been updated?

Challenging

I would probably rate this a 4 out of 10 in difficulty due to the fact that you have to Mount the image, and add your settings manually. I'd imagine Sune had to run through this several times before getting this right, which really stretches out testing considerably. While this wasn't difficult for him, others that may want to go down this route may have issues

Simply OSDCloud

In keeping with my topical with my post on KISS, I'll show you how to Simplify this process and make things more Dynamic.
First and foremost, it's called OSDCloud ... so in keeping with the Cloud part of the name, I can write a PowerShell Script and put that on GitHub as a file or a Gist. I'll add whatever I want to do in this script, such as setting the Display Resolution for Virtual Machines, or Ejecting the ISO (not solved yet). Buried in this script is my Start-OSDCloud command line which I set my OSLanguage and other stuff. Finally I need to get the raw URL using the Raw button
So this is what I have now
https://raw.githubusercontent.com/OSDeploy/OSDCloud/main/Demo-CustomOSDCloud.ps1

Edit-OSDCloud.winpe -WebPSScript

I added this parameter to give you the ability to execute a PowerShell script on the Internet using the Invoke-WebPSScript function, which ironically was released the same day as OSDCloud (this was not a coincidence)
This can be applied using the new WebPSScript parameter to WinPE
Edit-OSDCloud.winpe -WebPSScript https://raw.githubusercontent.com/OSDeploy/OSDCloud/main/Demo-CustomOSDCloud.ps1 -Verbose

Execution

As you can see from the screenshot below, Startnet.cmd is modified to execute my PowerShell script on GitHub which handles anything I want to do before and after Start-OSDCloud, as well as setting my defaults. Changing my parameters is as easy as changing the script on GitHub and there is no need to ever go back and update WinPE unless I need to make changes.
For those that are interested, here is what the final Startnet.cmd looks like