Get ConfigMgr Package Details via SQL

Here are some SQL queries to get additional package details from a ConfigMgr database.

-- Get Package Size in KB 
Select PackageID, Name, SourceSize from v_PackageStatusRootSummarizer
Order by SourceSize desc

-- Get Package Size in MB
Select PackageID, Name, SourceSizeInMB = SourceSize/1024 from v_PackageStatusRootSummarizer
Order by SourceSizeInMB desc

-- Get Package Type and Size in KB
Select DISTINCT vP.PackageID, vP.Name, vP.PackageType, vPSum.SourceSize from v_Package as vP
LEFT JOIN v_PackageStatusRootSummarizer as vPSum
ON vp.PackageID = vPSum.PackageID
Order by SourceSize desc

-- Get Package Type, Type Name, and Size in KB
Select 
	DISTINCT vP.PackageID,
	vP.Name, 
	vP.PackageType, 
	PackageTypeName =
	Case vP.Packagetype
	When 0 Then 'Regular 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 Application Package'
	When 8 Then 'Application Package'
	When 257 Then 'OS Image Package'
	When 258 Then 'Boot Image Package'
	When 259 Then 'OS Upgrade Package'
	End,
	vPSum.SourceSize from v_Package as vP
LEFT JOIN v_PackageStatusRootSummarizer as vPSum
ON vp.PackageID = vPSum.PackageID
Order by SourceSize desc
Result from the last query.
About the author

Johan Arwidmark

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

>