This script repairs the "The package data in WMI is not consistent to PkgLib" and "Package can't be found in PkgLib" errors in smsdpmon.log on Distribution Points by
searching for packages that appear to be in de Content Library according to WMI but are not there and do not exist anymore.


This cleanup will run against all distribution points and when invalid WMI instances are found, they will be removed.
Detailed description of this issue: http://blogs.technet.com/b/configmgrteam/archive/2012/05/07/troubleshooting-content-mismatch-warnings-on-a-distribution-point-in-system-center-2012-configuration-manager.aspx?wa=wsignin1.0

NOTE: This script will only work on ConfigMgr 2012 R2. It does not support ConfigMgr 2012/SP1.

Script is to be used at own risk