SCCM 2012 – Past due Applications / Change Deployment

Some Applications on our environment didn’t install. It only shows “Past due”. One workaround i found was on this site:

http://blogs.msdn.com/b/rslaten/archive/2013/11/26/past-due-applications-not-installing-in-sccm-2012.aspx

Thanks to Russ Slaten for this. I changed his script a little bit that you have a second paramter for the Collection Name.

Param(            
    [parameter(Mandatory=$true)]            
    $SiteCode,
	[string]$CollectionName
    )

Write-Host "SCCM 2012 SP1 Deadline Time Increment Script"
Write-Host "Version 1.0"
Write-Host "Parameters"
Write-Host "  SiteCode: "$SiteCode -ForegroundColor Green
Write-Host "  CollectionName: "$CollectionName -ForegroundColor Green

function GetCMSiteConnection
{
  param ($siteCode)

  $CMModulePath = Join-Path -Path (Split-Path -Path "${Env:SMS_ADMIN_UI_PATH}" -ErrorAction Stop) -ChildPath "ConfigurationManager.psd1"
  Import-Module $CMModulePath -ErrorAction Stop
  $CMProvider = Get-PSDrive -PSProvider CMSite -Name $siteCode -ErrorAction Stop
  CD "$($CMProvider.SiteCode):\"
  return $CMProvider
}

#Main

#Connect to SCCM, must have SCCM Admin Console installed for this to work
#If this fails then connect with the console to the site you want to use, then open PowerShell from that console
$CM = GetCMSiteConnection -siteCode $SiteCode
Write-Host "Connected to:" $CM.SiteServer
Write-Host 
Write-Host "---Updating Deployments---"

foreach ($Deployment in (Get-CMDeployment -CollectionName $CollectionName))
{
    Set-CMApplicationDeployment -Application (Get-CMApplication -Id $Deployment.CI_ID) -CollectionName $Deployment.CollectionName -DeadlineDate ($Deployment.EnforcementDeadline).AddMinutes(1) -DeadlineTime ($Deployment.EnforcementDeadline).AddMinutes(1) -Verbose
    Write-Host "  "$Deployment.SoftwareName" - "$Deployment.CollectionName -ForegroundColor Green
}

Now you can give the Site Code and your Collection Name. All Deployments on this Collection will then be changed. The script increased the Deadline +1 minute.

One thought on “SCCM 2012 – Past due Applications / Change Deployment

  1. Does changing the deadline +1 force all the servers to then install it? Why do we have to do this? Is there another fix that you know of?

    Thanks!

Leave a Reply

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