27.5 C
Ahmedabad
Friday, July 4, 2025

Fail to retried the package list on distribution point

Issue: Fail to retried the package list on distribution point 

Today we are discussing about distribution point having has miss match error fail to retried the package list on distribution point

Distribution points have packages in their WMI repository that don’t exist any longer on the site server. When the distribution point goes through a content validation cycle, it will fail and change its status to ‘Warning’.

The error you’ll see in the Distribution Point Configuration Status overview is

Error “Failed to validate content hash”

In some time you will see line of “Failed to retrieve the package list on the distribution point. Or the package list in content library doesn’t match the one in WMI. Review smsdpmon.log for more information about this failure. Then we have to look smsdpmon.log we do indeed see an error, 0x80070002 and the package ID in question. When we look up the package ID on the site server, it doesn’t exist.

To delete this package from the WMI repository on the distribution point, powershell is the quickest method:

Get-WMIObject -ComputerName “DPNAME” -Namespace “root\sccmdp” -Query (“Select * from SMS_PackagesInContLib where PackageID = ‘PACKAGEID'”) | Remove-WmiObject

Note: replace Distribution point name and package id.

To fix:

we have to login one of the distribution point or where you have access to read WMI

Open Powershell ISE Paste below script and replace name.   execute query you will see result of:

$computername = “DISTRIBTIONPOINT FQDN”

$WMIPkgList = Get-WMIObject -NameSpace Root\SCCMDP -Computername $computername -Class SMS_PackagesInContLib | Select -ExpandProperty PackageID | Sort-Object

$Reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey(‘LocalMachine’, $computername)

$RegKey= $Reg.OpenSubKey(“SOFTWARE\\Microsoft\\SMS\\DP”)

$ContentLib = $RegKey.GetValue(“ContentLibraryPath”)

$PkgLibPath = ($ContentLib) + “\PkgLib”

$drive = $PkgLibPath.SubString(0,1)

$PkgLibPath = $PkgLibPath.Replace(($drive+”:\”),(“\\”+$computername+”\”+$drive+”$\”))

$PkgLibList = (Get-ChildItem $PkgLibPath | Select -ExpandProperty Name | Sort-Object)

$PkgLibList = ($PKgLibList | ForEach-Object {$_.replace(“.INI”,””)})

$PksinWMIButNotContentLib = Compare-Object -ReferenceObject $WMIPkgList -DifferenceObject $PKgLibList -PassThru | Where-Object { $_.SideIndicator -eq “<=” }

$PksinContentLibButNotWMI = Compare-Object -ReferenceObject $WMIPkgList -DifferenceObject $PKgLibList -PassThru | Where-Object { $_.SideIndicator -eq “=>” }

Write-Host Delete these items from WMI:

$PksinWMIButNotContentLib

Write-Host Delete .INI files of these packages from the PkgLib folder:

$PksinContentLibButNotWMI

You will see below result:

One we have result we have to delete above listed package ID by using below PowerShell.

Note: if you search above package id you will not find any where in console.  

Remove package from wmi

$computername = “distribution point FQDN Name”

$Distribtuionpointname = $computername

$PackageID =  “PackageID”

Get-WMIObject -ComputerName $Distribtuionpointname -Namespace “root\sccmdp” -query (“select * from sms_packageincontlib where packageID = ‘” + $packageID + “‘”) | remove-wmiobject

Note: some time we may get result delete.Ini from Contentlib

Write-Host Delete .INI files of these packages from the PkgLib folder:

Once you have performed above task you are done and when next distribution point will run content validation your problem get resolve.

Happy Learning!!!
Thanks&regards,
Haresh Hirani
Email: [email protected], [email protected]
Facebook https://www.facebook.com/Hiraniconfigmgr-120189361980772/
Follow us: https://www.linkedin.com/in/hiraniconfigmgr 
Twitter: https://twitter.com/hiraniconfigmgr

Author

  • Hi, I Haresh Hirani, I am the person behind this webpage. Welcome to my page, Thank you for visiting the website and my page! My website is all about Microsoft technologies. More about ConfigMgr and all other technologies which are interesting for me. However, larger percentage of my posts are related to SCCM. Normally, like to post the interesting issues which I came across in my day to day tech life. you will find only solutions which comes on my day to day life.

- Advertisement -spot_img

2 COMMENTS

  1. I receive an error when executing this :

    $PksinContentLibButNotWMI
    Get-ChildItem : Cannot find path ‘\\MYSERVER.domain.com\D$\SCCMContentLib\PkgLib’ because it does not exist.
    At line:13 char:16
    + $PkgLibList = (Get-ChildItem $PkgLibPath | Select -ExpandProperty Nam …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (\\MYSERVER.d…ntentLib\PkgLib:String) [Get-ChildItem], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand

    Compare-Object : Cannot bind argument to parameter ‘DifferenceObject’ because it is null.
    At line:17 char:91
    + … ct -ReferenceObject $WMIPkgList -DifferenceObject $PKgLibList -PassTh …
    + ~~~~~~~~~~~
    + CategoryInfo : InvalidData: (:) [Compare-Object], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.CompareObjectCommand

    Compare-Object : Cannot bind argument to parameter ‘DifferenceObject’ because it is null.
    At line:19 char:91
    + … ct -ReferenceObject $WMIPkgList -DifferenceObject $PKgLibList -PassTh …
    + ~~~~~~~~~~~
    + CategoryInfo : InvalidData: (:) [Compare-Object], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.CompareObjectCommand

    Delete these items from WMI:
    Delete .INI files of these packages from the PkgLib folder:

  2. There’s a typo:
    packageincontlib should be a plural: PackagesInContLib – packages not package.
    There are also typos in the variable name but as they’re variables it’s not too important.

    Using camelcase would make this easier to read.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest posts