I got to the bottom of this, nothing wrong with my code. I have the SCCM client anonymised in the VMware template and my code was running too quickly trying to add to the task sequence before the client had registered within SCCM. I now have some looping checks before proceeding,. it seems it can take around 5mins for the client to register
↧