Here’s the SQL, I forgot you have to convert the program flags to get whether 
its disabled or not. Note the only difference is the where = and where !=. 
Thanks to Garth Jones on the basis for the conversion.

http://smsug.ca/blogs/garth_jones/archive/2010/06/23/list-of-disabled-programs.aspx

Disabled programs:
SELECT     dbo.v_Package.PackageID AS Package, dbo.v_Package.Manufacturer, 
dbo.v_Package.Name, dbo.v_Package.Version, dbo.v_Program.ProgramName,
                      dbo.v_Program.CommandLine, dbo.v_Program.Comment, 
dbo.v_Program.Description,
                      dbo.v_Program.ProgramFlags
FROM         dbo.v_Program INNER JOIN
                      dbo.v_Package ON dbo.v_Program.PackageID = 
dbo.v_Package.PackageID
where (0x00001000 & dbo.v_Program.ProgramFlags)/0x00001000 = 1
order by Manufacturer

Enabled programs:
SELECT     dbo.v_Package.PackageID AS Package, dbo.v_Package.Manufacturer, 
dbo.v_Package.Name, dbo.v_Package.Version, dbo.v_Program.ProgramName,
                      dbo.v_Program.CommandLine, dbo.v_Program.Comment, 
dbo.v_Program.Description,
                      dbo.v_Program.ProgramFlags
FROM         dbo.v_Program INNER JOIN
                      dbo.v_Package ON dbo.v_Program.PackageID = 
dbo.v_Package.PackageID
where (0x00001000 & dbo.v_Program.ProgramFlags)/0x00001000 != 1
order by Manufacturer

Daniel Ratliff


From: [email protected] [mailto:[email protected]] On 
Behalf Of Daniel Ratliff
Sent: Friday, August 09, 2013 5:22 PM
To: '[email protected]'
Subject: RE: [mssms] SCCM 2012 query for enabled programs

With WMI and PowerShell you can do:

Get-wmiobject -namespace root\sms\site_$sitecode -class sms_package 
-computername $siteserver | select packageid,status

Just full out the $ variables with your info.

I'll check it on a pc in a bit and fix the few syntax errors I probably have.

-Daniel Ratliff

-----Original Message-----
From: Adam, Debora [[email protected]<mailto:[email protected]>]
Sent: Friday, August 09, 2013 04:52 PM Eastern Standard Time
To: [email protected]<mailto:[email protected]>
Subject: [mssms] SCCM 2012 query for enabled programs


I’m looking for a query or report that shows a list of programs that are 
‘enabled.’ We have a bunch of programs we migrated over that are not enabled by 
default.

Any of you folks have something like that set up already?

Thanks,

Debora Adam
IT Client Infrastructure
ATK Aerospace Systems Group
[email protected]<mailto:[email protected]>
Office 435-863-3547
Mobile 435-452-1625



The information transmitted is intended only for the person or entity to which 
it is addressed
and may contain CONFIDENTIAL material. If you receive this material/information 
in error,
please contact the sender and delete or destroy the material/information.


The information transmitted is intended only for the person or entity to which 
it is addressed
and may contain CONFIDENTIAL material.  If you receive this 
material/information in error,
please contact the sender and delete or destroy the material/information.

Reply via email to