First of all – we mount the existing WIM (in this case, I’m mounting server 2012 R2 standard)
The directory D:\PSource$\OSD.Windows.2012.R2 has a full copy of 2012 R2
The directory D:\mount is empty
Dism /Mount-Image /ImageFile:D:\PSource$\OSD.Windows.2012.R2\sources\install.wim /Index:2 /MountDir:D:\mount
Dism /Image:D:\mount /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:D:\PSource$\OSD.Windows.2012.R2\sources\sxs
Dism /Unmount-Image /MountDir:D:\mount /Commit
This is much easier than the scripts and other things I see floating around the internet to do this in a task sequence. It also means that avoid issue applying the “.net killer” updates – KB2966826, KB2966827,KB2966828.
My suggestion when building a 8.1 or 2012 R2 TS is to
1) Dump the contents of the iso into your PackageSource with an appropriate name
2) Run the commands above to enable .net 3.5 in your base wim
3) Perform a dummy run of the TS, to see that it works, but also to allow the required updates list to be generated
4) Force (or wait) for a software updates scan to occur
5) Create your ADR (or manually select the required updates if you really want)
6) Use the awesome “Schedule updates” in SCCM 2012 R2 functionality to integrate updates into the wim
That way, you are off to quite a good start for your builds.