Skip to content

Automating Deployment of Essential Software Updates through SCCM

Automate Deployment of Overdue WSUS Updates in SCCM Environment:

Streamlining Software Updates: Automating Deployment of Essential Updates via SCCM
Streamlining Software Updates: Automating Deployment of Essential Updates via SCCM

Automating Deployment of Essential Software Updates through SCCM

In today's digital landscape, keeping software up-to-date is crucial for maintaining a secure and efficient system. This article outlines a step-by-step process for automating the deployment of missed WSUS updates in a System Center Configuration Manager (SCCM) environment.

Step 1: Create SQL Reports to Identify Missed Updates

Begin by developing or customizing SQL queries against the SCCM database. These queries will help identify clients with missed or failed WSUS updates. Common targets include software update compliance views such as , , or relevant tables in the SCCM site database.

Step 2: Render Reports to HTML for Emailing

Use SQL Server Reporting Services (SSRS) to deploy the SQL queries as reports. SSRS supports exporting report results directly into HTML format, making it compatible with email clients.

Step 3: Automate Emailing of Reports

Configure SQL Server Agent jobs or scheduled PowerShell scripts to:

  1. Run the SQL report at scheduled intervals.
  2. Export the report output as an HTML file or email body content.
  3. Send the formatted HTML report via email to relevant stakeholders.

Step 4: Leverage SCCM Reporting Features to Generate and Queue Report Data Arrays

Use SCCM built-in reporting features or custom report models to generate the summary of update compliance as an array or structured dataset. This array can then be fed into your scripts or reporting engine to dynamically build the HTML report content.

Step 5: Use an HTML Email Function to Format and Send

Implement or reuse an HTML email function in PowerShell, .NET, or other scripting languages that:

  1. Accepts the array or dataset from the report.
  2. Formats the data into a clean, readable HTML template (tables, status highlights).
  3. Sends the email via SMTP, ensuring appropriate headers and encoding for best rendering.

Step 6: Trigger Automated Deployment via SCCM

Based on the report outputs detecting missed updates, automate deployment actions within SCCM, such as:

  1. Creating or updating deployment collections for devices missing updates.
  2. Initiating automatic deployment packages or software update groups targeted at these collections.
  3. Monitoring deployment success and adjusting schedules accordingly.

Technical Notes and Best Practices

  • Ensure WSUS and SCCM’s Software Update Point (SUP) are healthy and synchronized with Microsoft Update to get accurate update metadata and compliance states.
  • Use SQL Server Agent jobs for scheduling automation tasks within your SCCM SQL environment.
  • If using PowerShell, you can leverage SCCM cmdlets to programmatically control deployment based on report findings.
  • The HTML email function should support inline CSS styles for broad email client compatibility.
  • Validate the schema and permissions of the SQL queries to avoid performance impact on the production SCCM database.
  • Consider the timing and frequency of automation to balance system load with timely patching.

By following this methodology, you can create an end-to-end WSUS update automation workflow in an SCCM environment. This approach leverages SQL reporting for precise detection, SCCM’s management framework for deployment, and automated HTML email notifications for communication.

Two additional functions, HTML Email Report and SCCM Report to Array, can help automate the process of detecting these updates and re-injecting them into Software Update Groups. The email function is an optional feature for reporting purposes, and the results can be automatically injected into the proper Software Update Group. The email is utilized to provide information about the updates. The goal is to automate running the report and doing something with the values that are returned.

Read also:

Latest