Powershell script to fix ContentLib inconsistency in WMI for ConfigMgr 2012 R2

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 bysearching for packages that appear to be in de Content Library according to WMI but are not there and do not exist

4.5 Star
14,391 times
Add to favorites
System Center
E-mail Twitter del.icio.us Digg Facebook
  • Specific Distribution point
    1 Posts | Last post July 10, 2019
    • Hi ..Is there any way i can run the script for define set of Distribution Point instead of running for all .
  • when a package is missing from WMI
    2 Posts | Last post November 22, 2018
    • If there are packages exist in Contlib but don't exist in WMI, Script doesn't notify about the missing package ID.  
    • Here's a complete script that expands on Bart's script to add the reconciliation of WMI and PkgLib. 
  • Nice Script always scared to do all DPs
    2 Posts | Last post August 17, 2018
    • Great work I am little reluctant to have it run though all me DP's so I added another prompt to ask DP server name and changed the DP query added the name field to where query. Good stuff though
    • Works on 1702 - thanks!!!
  • Question: How do you re-validate after running the script?
    2 Posts | Last post January 03, 2018
    • Thanks so much for your effort in creating this script. It worked quite well in our environment.
      How do you go and re-validate all the DP's so the icon changes to a green tick now? :)
    • Just to clarify - i was wondering if you knew how to launch a content validation on all dp's without waiting for a schedule. we have over 60 dp's. and apart from waiting for the schedule or launching the smsdpmon.exe as a one off on each server i couldnt think of a way.
      have you used a script perhaps?
  • Is this supported with ConfigMgr CB 1606?
    4 Posts | Last post July 13, 2017
    • Is this supported with ConfigMgr CB 1606?
    • For what it's worth, I can confirm that it works perfectly with SCCM 1610.
      It took some work to change the PS execution policy though.
    • Can also confirm, that this works on 1610.
    • Worked for me on 1702.
  • Thanks!!!
    1 Posts | Last post September 01, 2016
    • Great script. It worked perfectly for me just wanted to say thanks for all your work!
      Andy Konczak
  • SCCM 2012 SP2
    1 Posts | Last post February 19, 2016
    • Hello Bart, is your script supported in SCCM 2012 SP2?
  • What about the site sever?
    1 Posts | Last post August 06, 2015
    • Should the script also look at the data (WMI & Content Lib) on the Site Server too? Ins't the site server the authoritative source?
  • Not valid when ones DPs have different packages?
    1 Posts | Last post April 14, 2015
    • Hey,
      Browsing the code, it seems like having two DPs with different packages (deliberately) Distributed to, is not taken into consideration, am i right?
  • Error
    2 Posts | Last post August 21, 2014
    • I get this error when running this script on my machine. I'm not sure what to make out of it. Thanks.
      Where-Object : Cannot bind parameter 'FilterScript'. Cannot convert the "sideindicator" value of type "System.String" t
      o type "System.Management.Automation.ScriptBlock".
      At C:\users\jasonf\downloads\Remove-WMIInvalidContent.ps1:56 char:48
      +             $InvalidPackages = @($result |where <<<<  sideindicator -eq '<=')
          + CategoryInfo          : InvalidArgument: (:) [Where-Object], ParameterBindingException
          + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.WhereObjectCommand
    • Hi JHBPJF,
      it seems to fail on the 'where' statement in the script. I've corrected the line so it would work with Powershell v2.
      Try downloading the new script and run this one. If still any errors occur, just let me know.
1 - 10 of 13 Items