Error connecting to Distribution Point with Content Library Explorer

Today I had an issue with starting the Content Library Explorer which is contained in the ConfigMgr 2012 R2 Toolkit. The complete Error was “The legacy package does not have exactly one content.” like you can see in the next image.


This problem was also reported in the Technet forums but nobody had a easy or shareable solution for the problem. Now I created a PowerShell Script which will analyze the contentlib and report the packages with a problem back. You have only to modify the first line. The script has to be run on the distribution point with the issue.

$PathToDataLib = "E:\SCCMContentLib\DataLib" # Path to DataLib

# Get Legacy Package Folders
$folders = Get-ChildItem -LiteralPath $PathToDataLib | Where-Object { $_.Name.Length -ge 9 -and $_.Name.Length -le 11} | Select-Object -Property @{Name="Name";Expression={$_.Name.SubString(0,8)}}
$uniqueFolders = $folders | Select-Object -Property Name -Unique

# Display Statistics
Write-Host "Count of Folders found: $($folders.Count)"
Write-Host "Count of Unique Folders found: $($uniqueFolders.Count)"
Function Get-Duplicate {
    param($array, [switch]$count)
    begin {
        $hash = @{}
    process {
        $array | %{ $hash[$_] = $hash[$_] + 1 }
        if($count) {
            $hash.GetEnumerator() | ?{$_.value -gt 1} | %{
                New-Object PSObject -Property @{
                    Value = $_.key
                    Count = $_.value
        else {
            $hash.GetEnumerator() | ?{$_.value -gt 1} | %{$_.key}

# Display Duplicated Packages
Get-Duplicate ($folders | Select -ExpandProperty Name) -count

The result will look like this:


After redeploying these packages the Content Library Explorer could be started without errors.

Thomas Kurth

Thomas Kurth

I’m a consultant, trainer and architect for modern workplace and enterprise mobility projects with Microsoft Technologies in the past eight years. I love to push and design the modern workplace based on Windows 10, EM&S and O365 for my customers which is the only answer for the current security threats, agile world and the fast-changing business requirements of my customers. Important for me is to simplify and automate the operational processes, because there are the highest costs.


BIgMike · July 29, 2016 at 10:30

Thanks for the script. I could not run Library Content Explorer either until I ran this script. Once I ran the script and identified the problem packages I just removed the problem DP from the packages and I could then connect successfully with the Content Explorer.
Again, many thanks


    Thomas Kurth · July 29, 2016 at 10:54

    Hi Mike,
    Thanks for the Feedback!

    Have a nice day.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Hosting sponsored by: