/build/static/layout/Breadcrumb_cap_w.png

How to Re-run a failed deployment on multiple machines(SCCM)

Prerequisites:

  1. Sccm Client Center

  2. Deployment id , package id ,program

  3. Windows PowerShell(by default)

  4. List of machines.

When there is a scenario where 15 percentages of machines where applications failed due to run time exceed error. The application uninstalled the older version but it doesn’t install the latest versions and throw error as Run time exceed even though the maximum Run time was extended to 45 mins.

The 15 percentage is almost 800 machines but rest of the machines was able to receive and get the application deployed successfully.

While the deployment\advertisement was re-run via sccm client center, the application was successfully deployed. Hence planned to automate the re-run task for 800 machines and it works like a charm

Solutions:

Hope most of us have seen the dll file in SCCM Client Center folder which is core for this application.

Powershell has the capability of working with dll files.

Sou61p.png

Script:

Add-Type -Path 'C:\SCCM Client Center\smsclictr.automation.DLL'

$strcomp=Get-Content "C:\computers.txt"

$strcomp | where{test-connection $_ -quiet -count 1} |ForEach-Object{

 $ReRun = New-Object -TypeName smsclictr.automation.SMSClient($_)

 $ReRun.SoftwareDistribution.RerunAdv("<Deploymentid>", "<PackageID>", "<PROGRAMNAME>")

 }

 

Exceptions:

This script will fail to execute on below scenarios

  1. WMI Corrupted

  2. Access denied on target machines

  3. RPC issues

  4. When deployment is not targeted


Comments

This post is locked
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ