SCCM Packages report with Packagetype

There was a question asked in the Microsoft Technet forum after a report which displayed all virtual application packages in the site. From that I got the idea to add a column to the normal All Packages report which contains the Packagetype. After the modification the report looks has a new column called Package Type and looks like this:

PackagesReport

I hope this can be useful for more than myself, the report can be downloaded here: http://ccmexec.com/wp-content/uploads/2011/05/Packagereport.MOF

If you want the query instead it looks like this with all the changes from the standard report displayed in bold:

SELECT Name AS C062,
PackageType =
Case Packagetype
When 0 Then ‘Software Distribution Package’
When 3 Then ‘Driver Package’
When 4 Then ‘Task Sequence Package’
When 5 Then ‘Software Update Package’
When 6 Then ‘Device Settings Package’
When 7 Then ‘Virtual Package’
When 257 Then ‘Image Package’
When 258 Then ‘Boot Image Package’
When 259 Then ‘OS Install Package’
End,
Description,
Manufacturer,
Version,
Language,
v_Package.SourceSite,
SUBSTRING(ServerNALPath, CHARINDEX(‘\\’, ServerNALPath) + 2, CHARINDEX(‘”]’, ServerNALPath) – CHARINDEX(‘\\’, ServerNALPath) – 3 ) as C070,
v_Package.PackageID,
case when v_DistributionPoint.IsPeerDP=1 then ‘*’ else ” end as BranchDP
FROM v_Package
LEFT OUTER JOIN v_DistributionPoint ON v_Package.PackageID = v_DistributionPoint.PackageID
ORDER by Name
SELECT Name AS C062,
PackageType =
Case Packagetype
When 0 Then ‘Software Distribution Package’
When 3 Then ‘Driver Package’
When 4 Then ‘Task Sequence Package’
When 5 Then ‘Software Update Package’
When 6 Then ‘Device Settings Package’
When 7 Then ‘Virtual Package’
When 257 Then ‘Image Package’
When 258 Then ‘Boot Image Package’
When 259 Then ‘OS Install Package’
End,
Description,
Manufacturer,
Version,
Language,
v_Package.SourceSite,
SUBSTRING(ServerNALPath, CHARINDEX(‘\\’, ServerNALPath) + 2, CHARINDEX(‘”]’, ServerNALPath) – CHARINDEX(‘\\’, ServerNALPath) – 3 ) as C070,
v_Package.PackageID,
case when v_DistributionPoint.IsPeerDP=1 then ‘*’ else ” end as BranchDP
FROM v_Package
LEFT OUTER JOIN v_DistributionPoint ON v_Package.PackageID = v_DistributionPoint.PackageID

ORDER by Name

3 Comments

Add a Comment

Your email address will not be published. Required fields are marked *