I was planning to do some housekeeping on DPs by removing unsued packages. Got a sql query from somewhere which gives the package details are associated with expired Ads which helped me to find obsolete packages and its easier to remove those from DPs and free some space.
SELECT PackageID, Name, Version, Manufacturer, Language, Description, PkgSourcePath AS [source Path], LastRefreshTime, (SELECT COUNT(PkgID) FROM vPkgStatusSummaryDistPts WHERE PkgID = v_Package.PackageID) AS [No of DP] FROM v_Package WHERE PackageID NOT IN (SELECT PackageID FROM v_Advertisement) AND PackageID NOT IN (SELECT ReferencePackageID FROM v_TaskSequenceReferencesInfo) AND PackageType = 0 ORDER BY Name
Dont remember from where I got the query but if its from this forum , do excuse me
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Hi
I was planning to do some housekeeping on DPs by removing unsued packages. Got a sql query from somewhere which gives the package details are associated with expired Ads which helped me to find obsolete packages and its easier to remove those from DPs and free some space.
SELECT PackageID, Name, Version, Manufacturer, Language, Description,
PkgSourcePath AS [source Path], LastRefreshTime,
(SELECT COUNT(PkgID) FROM vPkgStatusSummaryDistPts WHERE PkgID = v_Package.PackageID) AS [No of DP]
FROM v_Package
WHERE
PackageID NOT IN (SELECT PackageID FROM v_Advertisement) AND
PackageID NOT IN (SELECT ReferencePackageID FROM v_TaskSequenceReferencesInfo) AND
PackageType = 0
ORDER BY Name
Dont remember from where I got the query but if its from this forum , do excuse me
Share this post
Link to post
Share on other sites