Currently we are Deploying our Windows 10 Machines with Windows Deployment Services(WDS) with a unattend.xml file for basic settings. From time to time there are machines which won't activate windows automatically(we are using OEM licences). This seems to happen only with new machines on which Windows wasn't activated before.
To "bypass" this issue, I've created a small powershell-script which gets the windows-key from bios/uefi and activates the windows copy with this key. The Script is working well and I would like to add it to the unattend.xml to run it automatically after setup. I would like to store the script on our fileserver(to avoid changing the image each time when I changed the script) and run it from there. Where do I have to configure this in the unattend.xml file ? Is this even possible ?
I found a topic on serverfault(How can I run a PowerShell script during the specialize pass of a WDS deploy?) where they talk about this. In the comments section they talk about adding it to the OOBE and autologon section. Since I'm a bit confused(and the topic is really old), I would like to ask: - Do I have to configure an autologon with the right credentials and run the script under this autologon user ? And if so: how is this done in the unattend.xml File ?