I’m going to show you a new approach to getting deployment status out of SCCM.
Most of our readers are familiar with using SCCM Reports, or the SCCM console, to get deployment status when asked. Usually, when asked, I turn to SQL. However, I was looking at all the cmdlets that come with SCCM when I realized: There are no cmdlets dedicated to simple reporting.
As such, I took it upon myself to create a simple cmdlet that returns both summary and details of the status of an Application Deployment. I’ll include the code at the bottom of this post, but first, I’ll show you how to use it.
The name of the script is CMReporting.ps1. For now, all the required functions are within this script.
Using the Script to Get Deployment Status
To use this script, you first need to load the functions into memory by running the script.
This script must be run from the SCCM Site Server.
Here is one example on how to use it:
Get-CMAppDeploymentReport -ChooseFromGrid -DetailType Both -OutputType Text
You are first presented with a gridview list of all current app deployments. Highlight one and click “OK”.
After about 30 seconds, you’ll see a display like the following in PowerShell:
As promised, here is the code: