Get the content deployment status for packages in a task sequence

SCCM has great reporting in the console, if you want to see the status of all distribution points for a single package or the status of all packages on a single distribution point. But trying to determine the status of 30-40 packages quickly does not happen very quickly. That is

 
 
 
 
 
5 Star
(1)
940 times
Add to favorites
System Center
10/13/2015
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Not working in 1710?
    2 Posts | Last post July 04, 2018
    • Is this not working for everyone now in 1710? Having made the changes suggested by MPFister I can now see all of the names and id's but each one comes up not found on my DPs, even when I know for a fact that they are there.
    • @DonkF were you able to get this working? The script is reading the status messages reported by the distribution points. You should see the same status being reported in the console.  
  • Applications
    2 Posts | Last post February 23, 2018
    • In SCCM 1706 I won't get any appliction used in the task sequence in
      
      [xml]$TS = Get-CMTaskSequence -TaskSequencePackageId $TaskSequencePackageId| select -ExpandProperty Sequence 
      $rpkg = $ts.sequence.referenceList.reference.package|Select-Object -Unique 
      
      $rpkg array just contains packages of "non application type"
      
      
      I changed this to 
      
      $TS =  Get-CMTaskSequence -TaskSequencePackageId $TaskSequencePackageId| Select-Object Name, PackageID, References | Where-Object { $_.References -ne $null } 
      $rpkg = $TaskSequence.references.package|Select-Object -Unique 
      
      Now I get PackageIDs for applications as well, they start with ScopeID_....
      
      Retrieving the name requires special handling too:
      
      Instead of
      
      if(!($pkgname)){$pkgname = (Get-CMApplication -Id $pkg |Select-Object Name).Name} 
      
      use
      
      if(!($pkgname)){$pkgname =(Get-CMApplication -ModelName $pkg | Select-Object LocalizedDisplayName).LocalizedDisplayName}
      
      Hope that helps someone...
      
    • Thanks for the info @mpfister 
      
  • What about Applications?
    2 Posts | Last post June 12, 2017
    • How would you cater for Applications?
    • Because the status comes from a wmi query by the object id The script will give the status of applications that are direct references of the task sequence. But it will not be able to look up the Application name without modification. Change $pkgname = (Get-CMPackage -Id $pkg |Select-Object Name).Name
                  if(!($pkgname)){$pkgname = (Get-CMDriverPackage -Id $pkg |Select-Object Name).Name}
      	        if(!($pkgname)){$pkgname = (Get-CMBootImage -Id $pkg |Select-Object Name).Name}
      	        if(!($pkgname)){$pkgname = (Get-CMOperatingSystemImage -Id $pkg |Select-Object Name).Name}
      	        if(!($pkgname)){$pkgname = (Get-CMSoftwareUpdateDeploymentPackage -Id $pkg |Select-Object Name).Name}
      
      to 
      
      $pkgname = (Get-CMPackage -Id $pkg |Select-Object Name).Name
                  if(!($pkgname)){$pkgname = (Get-CMDriverPackage -Id $pkg |Select-Object Name).Name}
      	        if(!($pkgname)){$pkgname = (Get-CMBootImage -Id $pkg |Select-Object Name).Name}
      	        if(!($pkgname)){$pkgname = (Get-CMOperatingSystemImage -Id $pkg |Select-Object Name).Name}
      	        if(!($pkgname)){$pkgname = (Get-CMSoftwareUpdateDeploymentPackage -Id $pkg |Select-Object Name).Name} 
                      if(!($pkgname)){$pkgname = (Get-CMApplication -Id $pkg |Select-Object Name).Name}