I use MDT to build the image I deploy with SCCM. When the image have been patched, there is a lot of superseded patches and temp files. With this script “Action-CleanupBeforeSysprep-2_4.wsf” you can remove a lot of the files that are not needed anymore. It is about 1 GB you can compress the image. For Windows 8 + Windows 8.1 + Windows 10, you can skip step 2 to 6. Thanks to Mikael Nystrom blog post for the inspiration.
1. Download “Action-CleanupBeforeSysprep-2_4.wsf” and create an application in MDT