SCCM Report - All Packages, Programs and their command lines

Published September 19, 2013 by FoxDeploy

Depicts an image saying 'Scripting System Center Configuration Manager'

This post is part of the ‘Scripting SCCM’ series on FoxDeploy, click the banner for more!

I recently had a requirement at a client to make a list of all SCCM Packages. their Programs,  and then the command lines of each, along with the package source.  I wondered if this was possible, and fortunately the SQL Views were already present to do so. This ended up being a very short query:

SELECT Program.PackageID, 
      Package.Name 'Package Name', 
      Program.ProgramName 'Program Name', 
      Program.CommandLine, Program.Comment, 
FROM v_Program as Program 
  LEFT JOIN v_Package as Package 
    on Package.PackageID = Program.PackageID
Order by Program.PackageID

And the output  Some of these command lines were VERY long, so it came out a bit wide.:

Microsoft MVP

Five time Microsoft MVP, and now I work for the mothership

Need Help?

Get help much faster on our new dedicated Subreddit!

depicts a crowd of people in a night club with colored lights and says 'join the foxdeploy subrreddit today'

Blog Series
series_sml_PowerShellGUI series_sml_IntroToRaspberryPi Programming series_sml_IntroToWindows Remote Management Series The Logo for System Center Configuration Manager is displayed here Depicts a road sign saying 'Learning PowerShell Autocomplete'

Blog Stats