Close Menu
    Facebook X (Twitter) Instagram
    Saturday, October 11
    X (Twitter) LinkedIn Reddit RSS
    All about Endpoint Management
    • Home
    All about Endpoint Management
    Home»CM2012»SCCM Configmgr 2012 Powershell Script: Redistribute Multiple Packages to single Distribution Point

    SCCM Configmgr 2012 Powershell Script: Redistribute Multiple Packages to single Distribution Point

    Eswar KonetiBy Eswar KonetiSeptember 16, 4:07 pm1 Min Read CM2012 5,687 Views
    Share
    Facebook Twitter LinkedIn Reddit

    In my Previous blog,I posted script On How to Refresh/Redistribute One package on List of Distribution Points http://eskonr.com/2013/09/sccm-configmgr-powershell-script-refresh-package-on-multiple-distribution-points/

    This post talks about how to Refresh / Redistribute list of packages to Single distribution Point.

    import-module F:\sccm\AdminConsole\bin\ConfigurationManager.psd1
    #Change the site Code
    $SiteCode = "P01"
    #provide the path list of packages to be Refreshed
    $packages =GC "C:\scripts\pkglist.txt"
    foreach ($package in $packages)
    {
    #Provide the DP server Name to be refreshed ON
    $Server = "CM12DP01"  #host name is enough,no FQDN is required
    $pkgs = Get-WmiObject -Namespace "root\SMS\Site_$($SiteCode)" -Query "Select * From SMS_DistributionPoint WHERE PackageID='$Package' and serverNALPath like '%$Server%'"
    foreach ($pkg in $pkgs)
    {
    $pkg.RefreshNow = $true
    $pkg.Put()
    # "Pkg:" + $package + " "+ "Refreshed On" + " "+ "Server:" +$server | Out-File -FilePath C:\Scripts\server-refresh-results.txt -Append
    }
    }

    For troubleshooting,monitor distmgr.log,sender.log(for primary or secondary), pkgxfermgr.log (for Remote Distribution Points).

    To get the package compliance status on all the Distribution Points ,refer SSRS SQL code http://eskonr.com/2013/09/sccm-configmgr-2012-ssrs-reportstatus-of-distribution-points-with-its-package-compliance-status/

    CM12 configmgr Distribution Point Powershell Powershell to redistribute packages redistribute Redistribute Multiple Packages Refresh refresh packages using powershell SCCM script
    Share. Twitter LinkedIn Email Facebook Reddit

    Related Posts

    Export Microsoft Entra ID User Authentication Methods to CSV using PowerShell & Microsoft Graph API

    August 13, 2:08 pm

    SCCM SQL Report – Compare Installed Apps on TWO Different Computers

    July 13, 10:35 am

    Exporting Intune Win32 Apps with All Properties Using PowerShell and Microsoft Graph

    June 30, 7:01 pm

    1 Comment

    1. Pingback: PowerShell to refresh select packages on a distribution point using an input file – System Center Configuration Manager Notes

    Leave a ReplyCancel reply

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

    Sign Up

    Get email notifications for new posts.

    Author

    I’m Eswar Koneti ,a tech enthusiast, security advocate, and your guide to Microsoft Intune and Modern Device Management. My goal? To turn complex tech into actionable insights for a streamlined management experience. Let’s navigate this journey together!

    Support

    Awards

    Archives

    © Copyright 2009-2025 Eswar Koneti, All rights reserved.

    Type above and press Enter to search. Press Esc to cancel.