Add all packages that are on a distribtuion point to a new distribution point

ComputerHabit 1,036 Reputation points
2022-06-08T20:49:57.963+00:00

I have packages deployed to a Distribution Point. I added a new Distribtuion Point in the same site.

How do I ensure all the packages deployed to the old Distribtuion Point are assigned to the new Distribtuion Point?

Microsoft Security | Intune | Configuration Manager | Other
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. ComputerHabit 1,036 Reputation points
    2022-06-09T12:49:46.627+00:00

    Here's the script for some peer review. Let me know if I could have done it better.

    $sourceServer = ""  
    $destinationServer = ""  
      
    $existingPackages = Get-CMDeploymentPackage -DistributionPointName $destinationServer  
      
    $dpPackages = Get-CMDeploymentPackage -DistributionPointName $sourceServer  
      
    $Error.Clear()  
    foreach($dpPackage in $dpPackages){  
      
        if($dpPackage.PackageID -in $existingPackages.PackageID){Write-Host -ForegroundColor Green "Package $($dpPackage.PackageID) already exists" ;continue}  
      
        Write-Host -ForegroundColor Yellow "Adding package $($dpPackage.PackageID)"  
      
        switch ($dpPackage.ObjectType)  
        {  
            0 {'Software Distribution Package';Start-CMContentDistribution -DistributionPointName $destinationServer -PackageId $dpPackage.PackageID}  
            3 {'Driver Package';Start-CMContentDistribution -DistributionPointName $destinationServer -DriverPackageId  $dpPackage.PackageID}  
            4 {'Task Sequence Package';Start-CMContentDistribution -DistributionPointName $destinationServer -TaskSequenceId  $dpPackage.PackageID}  
            5 {'Software Update Deployment Package';Start-CMContentDistribution -DistributionPointName $destinationServer -DeploymentPackageId $dpPackage.PackageID}  
            6 {'Device Setting Package';Start-CMContentDistribution -DistributionPointName $destinationServer -PackageId $dpPackage.PackageID}  
            7 {'Virtual Package';Start-CMContentDistribution -DistributionPointName $destinationServer -PackageId  $dpPackage.PackageID}  
            257 {'Operating System Images Package';Start-CMContentDistribution -DistributionPointName $destinationServer -OperatingSystemImageId  $dpPackage.PackageID}  
            258 {'Boot Image Package';Start-CMContentDistribution -DistributionPointName $destinationServer -BootImageId $dpPackage.PackageID}  
            259 {'Operating System Install Package';Start-CMContentDistribution -DistributionPointName $destinationServer -OperatingSystemInstallerId  $dpPackage.PackageID}  
            512 {'Software Distribution Application';  
                    $app = Get-CMApplication | Where-Object {$_.PackageID -eq $dpPackage.PackageID}  
                    Start-CMContentDistribution -DistributionPointName $destinationServer -ApplicationId $app.CI_ID  
                    #change to distribution point group name?  
                    #start-CMContentDistribution -ApplicationID $app.CI_ID -DistributionPointGroupName “$ServerName”  
            }  
            Default {"Unknown"}  
        }  
      
        #if($Error){break}  
      
    }  
    
    3 people found this answer helpful.

  2. Rahul Jindal [MVP] 10,911 Reputation points MVP
    2022-06-09T06:06:38.563+00:00

    One way is to use DP groups. But that will require you to add existing DPs and packages to DP groups as well. The other option is to extract a list of the content and use powershell to distribute the content using start-CMContentDistribution.

    1 person found this answer helpful.
    0 comments No comments

  3. Simon Ren-MSFT 40,341 Reputation points Microsoft External Staff
    2022-06-09T08:05:04.573+00:00

    Hi @ComputerHabit ,

    Thanks for posting in Microsoft MECM Q&A forum.

    Agree with @Rahul Jindal [MVP] . Generally speaking, it's recommended to use distribution point groups rather than individual distribution point to manage content more effectively. Distribution point groups provide a logical grouping of distribution points for content distribution. Use these groups to manage and monitor content from a central location for distribution points that span multiple sites. Keep the following point in mind:

    1,Add one or more distribution points from any site in the hierarchy to a distribution point group.

    2,Add a distribution point to more than one distribution point group.

    3,When you distribute content to a distribution point group, Configuration Manager distributes the content to all distribution points that are members of the group.

    4,If you add a distribution point to the group after an initial content distribution, Configuration Manager automatically distributes the content to the new distribution point member.

    Hope it helps. Thanks for your time.

    Best regards,
    Simon


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  4. ComputerHabit 1,036 Reputation points
    2022-06-09T12:28:01.4+00:00

    I wasn't seeing packages be updates automatically on a new distribution point added to the same DP Group.

    I did pull up powershell and writing a script. I'm almost done. I'm getting an error on on particular package type.

    I'm basically getting all the packages from one DP and distributing to the other.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.