SCCM – SQL – Return All Package Names

email me

Tested in SQL Studio v17.

SELECT Program.PackageID,
Package.Name 'Package',
Program.ProgramName 'Type',
Program.CommandLine,
Program.Comment,
Program.Description,
Package.PkgSourcePath
FROM [v_Program] as Program
LEFT JOIN v_Package as Package on Package.PackageID = Program.PackageID
WHERE Program.ProgramName <> '*'
Order by Package.Name