If you were looking for a programmatic script (Python/PowerShell) to automate this, please see the note at the end.

If you manage a Server Core installation or prefer scripting, use the command line.