Before going any further
Please note, that this script is not intended for production use. It was a hacky solution designed SOLELY to serve the purpose of quickly provisioning devices for hot-spare covid-19 devices.
There are far more elegant solutions. I am not saying that this is the best, most efficient, or most practical way to do it - but it worked for us, and it may come in handy for you.
_Note_ - Some sensitive data has been amended or redacted.