Features On Demand

How To Patch Windows Image to be able to install Features On Demand on patched Windows Server 2012:
0. Show applied patches:
WMIC QFE > PATCHES.TXT
NOTEPAD PATCHES.TXT
1. Download patches using “WSUS Offline Update”
C:\wsusoffline\UpdateGenerator.exe
2. Mount the wim-file using dism:
dism /mount-wim /WimFile:C:\wsusoffline\wim\install.wim /index:2 /mountDir:C:\wsusoffline\dismmount
3. Apply patches
dism “/Image:c:\wsusoffline\dismmount” /Add-Package “/PackagePath:C:\wsusoffline\client\w62-x64\temp”
4. Commit changes
dism /Unmount-Wim /MountDir:c:\wsusoffline\dismmount /commit
5. Repeat step 2-4 for the other images (index 1,3,4)

References:
http://www.virtualizationadmin.com/kbase/VirtualizationTips/GeneralVirtualizationTips/ServerVirtualizationTips/ManagementAdministration/CheckinginstalledupdatesonServerCore.html
http://www.sysadminlab.net/mobile/creating-a-fully-patch-install-wim-for-windows-78-without-mdt-but-using-wsus-offline-updater
http://blogs.technet.com/b/joscon/archive/2013/06/24/3532554.aspx#pi47623=2
https://technet.microsoft.com/en-us/magazine/hh825626.aspx

To list packages added to the image:
dism /Image:C:\wsusoffline\dismmount /Get-Packages

For troubleshooting installations:
C:\Windows\Logs\CBS\CBS.LOG