I have been facing a small little anoying problem. I had a WIM file, that needed to have an EXACT list of KB’s in it. Not one more, not one less.

My WIM had several KBs in it that where not part of that list.

While The configuration manager team provided us a great tool to add updates to a WIM file using offline Servicing  (Which you cannot use for bulk imports 🙁  ), they forgot somehow to give us the possibility to remove some of updated that have been injected in the WIM if needed.

Find below the wrapper function i wrote (based on DISM) in order to be able to delete the extra updates.