Uncategorized

ConfigMgr – SQL query to find Package type

select *, ‘Package Type (Text)’ = Case when v_Package.PackageType = 0 Then ‘Software Distribution Package’ when v_Package.PackageType = 3 Then ‘Driver Package’ when v_Package.PackageType = 4 Then ‘Task Sequence Package’ when v_Package.PackageType = 5 Then ‘Software Update Package’ when v_Package.PackageType… Read More ›

ConfigMgr – SCCM Advertisement, Package Type and Program Information with Target Count

select CollectionID, COUNT(*) as MemberCount into #TempTable from v_FullCollectionMembership group by CollectionID SELECT dbo.v_Advertisement.AdvertisementID, dbo.v_Advertisement.AdvertisementName, ‘PackageType’ = Case when v_Package.PackageType = 0 Then ‘Software Distribution Package’ when v_Package.PackageType = 3 Then ‘Driver Package’ when v_Package.PackageType = 4 Then ‘Task Sequence… Read More ›

ConfigMgr : Query to find SCCM client versions (ConfigMgr 2012)

download : SQLQuery-find-agentsversions select sys.Client_Version0, “CM Name”= case sys.Client_Version0 when ‘4.00.6487.2000’ then ‘CM07 SP2 (4.00.6487.2000)’ when ‘4.00.6487.2188’ then ‘CM07 R3 (4.00.6487.2188)’ when ‘4.00.6487.2187’ then ‘CM07 R3 (4.00.6487.2187)’ when ‘4.00.6487.2157’ then ‘CM07 R3 (4.00.6487.2157)’ when ‘5.00.0000.0000’ then ‘CM12 RTM (5.00.0000.0000)’ when ‘5.00.7804.1000’… Read More ›

ConfigMgr : SQL Query to find Application and version by location

Download :  SQLQuery-Findmachines-withoutlook-locationspecific SELECT distinct b.Netbios_Name0, b.User_Name0, b.ad_site_name0, a.FileName, a.FileVersion, a.FilePath FROM v_GS_SoftwareFile a JOIN v_R_System b ON a.ResourceID = b.ResourceID JOIN v_RA_System_SystemOUName c ON a.ResourceID = c.ResourceID WHERE FileName = ‘outlook.exe’ and AD_Site_Name0 like ‘%perth%’ ORDER BY b.Netbios_Name0