When creating a Windows 10 reference image a common issue is that the store updates will autoupdate while you are busy installing software updates and applications. This then causes sysprep to fail in giant ball of fire.
To solve this there are basically two options and for some option one doesn’t seem to work which is why I always opt for option two.
Option 1, follow the guidance for disabling auto store updates. This consists of adding a DWORD registry item to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsStore named AutoDownload with a value of 2. More info on how to do this check out the blog over at deploymentresearch.com
Option 2, is to use a WSUS and then disable internet access for the duration of the build. This can easily be achieved using PowerShell and a sprinkle of magic.
Here is how! Lets start with creating a small PowerShell Script.
Save that into as Invoke-InternetAccess.ps1 and place the file into the MDT deployment share script folder.
Now time to set the sequence.
Add two “Run PowerShell script” steps as shown below.
For the first one just set the script name to Invoke-InternetAccess.ps1
For the second one set the script name to Invoke-InternetAccess.ps1 and parameters to –Disable
All done! Now you can run your sequence and not worry about any store updates during your build.