They finally made a CLI version of it a decade ago and it works exactly as it should when setting up a new system with a script.

https://learn.microsoft.com/en-us/windows-server/administrat...