Skip to content

Automated Reports for Recent SCCM Deployments

"Script Developed for Emailing SCCM Deployment Reports: The Get-DMGSCCMNewDeployments script is designed to automate the generation and delivery of weekly SCCM deployment reports to administrators. Leveraging native SCCM techniques, this script constructs a user-friendly report detailing newly...

Automated Report on Recent SCCM Deployments
Automated Report on Recent SCCM Deployments

Automated Reports for Recent SCCM Deployments

In the world of System Centre Configuration Manager (SCCM) administration, staying informed about new deployments is crucial. To simplify this process, a PowerShell script named "Get-DMGSCCMNewDeployments" has been created to automate the generation and delivery of a weekly deployment report via email.

The script works by querying SCCM for new deployments within a specified time frame. To modify the date range of the report, you'll need to locate the part of the script that queries deployment records by date and adjust the filter parameters.

Typically, the script uses a date filter like or a query predicate against a deployment timestamp property such as , , or . Adjusting the date range involves three main steps:

  1. Identifying the date variables or parameters: The script often has parameters or variables for a start date and an end date, such as and .
  2. Modifying the date filter in the query: For example, if the script uses something like:

you can change and to the desired date range.

  1. Setting the date range values: You can hardcode the dates or allow them as script parameters. For example:

This would by default look at deployments in the last 7 days.

Once the filtered deployments are obtained, the report is compiled one array at a time, and the array of arrays is fed into an HTML email script for delivery.

If your script does not currently have parameters for the date range, you can add them at the top and update the query accordingly. For instance, the script might include parameters like and to define the date range.

By adjusting the values of and in the invocation function, you can change the date range of the report. This report provides a "what was deployed this week" summary and is intended for SCCM administrators, making it easier to stay up-to-date with the latest deployments within their SCCM environment.

  1. By modifying the values of the start date ($startDate) and end date ($endDate) parameters in the invocation function, you can change the date range of the deployment report provided by the PowerShell script "Get-DMGSCCMNewDeployments".
  2. To stay informed about new deployments in a specific time frame within System Centre Configuration Manager (SCCM) administration, you can adjust the date filter in the query by changing the start date and end date parameters in the PowerShell script "Get-DMGSCCMNewDeployments". This is achievable by locating the script's date variables or parameters such as $startDate and $endDate, and updating them with the desired date range.

Read also:

    Latest