SCCM Global Condition for PC System Type (aka Application "Requirement")

Have you ever needed to deploy an Application just to a laptop or just to a desktop? The built-in Global Conditions in SCCM leave a lot of room for expansion and improvement. For this exercise, I'm going to show you how to make a Global Condition with a simple WMI query through WQL in order to deploy an Application to laptops (or other laptop like devices such as Surfaces, 2-in-1s, etc) only.

Step one will be to create a Global Condition in SCCM for the Win32_ComputerSystem class with the PCSystemType property. Step two will be to create a requirement on the deployment type for our Application with this custom requirement looking for a value of 2 (mobile). 

Possible Enumeration Values for ROOT\cimv2:Win32_ComputerSystem\PCSystemType: 
0 - Unspecified
1 - Desktop
2 - Mobile
3 - Workstation
4 - Enterprise Server
5 - SOHO Server
6 - Appliance PC
7 - Performance Server
8 - Maximum

Step 1:  Create a new Global Condition

1.  In the Configuration Manager console, go to Software Library\Overview\Application Management\Global Conditions and click on Create Global Condition

2.  In the Create Global Condition Window, input the following:
Name:  PC System Type
Description:  Possible values: 1 (Desktop), 2 (Mobile), 3 (Workstation), 4 (Enterprise Server), 5 (SOHO Server), 6 (Appliance PC), 7 (Performance Server), 8 (Maximum), 0 (Unknown)
Device Type:  Windows
Condition Type:  Setting
Setting Type:  WQL Query
Data Type:  String
Namespace:  root\cimv2
Class:  Win32_ComputerSystem
Property:  PCSystemType

Step 2:  Add the new "Requirement" to your Application

1.  In the Configuration Manager console, go to Software Library\Overview\Application Management\Applications and select the properties for the Deployment Type on one of your Applications

2.  In the Deployment Type Properties, go to the "Requirements" tab and click Add

3.  In the Create Requirement window, select the Custom category, select your PC System Type condition, set the rule type to Value, set the operator to Equals, enter the value 2 for laptops, and click OK

4.  The Deployment Type Properties should now have your custom Requirement listed and you can click OK to close it

5.  Distribute and deploy your application like normal. If you want to test your Global Condition, just create a Simulated Deployment and look in Monitoring\Deployments. Click on View Status for your deployment and you should see a number of "Simulated Success" as well as a number of "Requirements Not Met" indicating that your new Global Condition works as expected.


It's worth noting that there are a number of ways to target laptops in WMI under the ROOT\cimv2 Namespace, but the PCSystemType has always been the simplest and easiest in my experience. The most common method used by others is the class Win32_SystemEnclosure with the ChassisTypes property. Another fan favorite is the class Win32_Battery with the BatteryStatus property having a value of anything but 0. 
P.P.S.  Bonus:  Use WMI Explorer 2 to browse WMI and find thousands of ways you can rinse and repeat these instructions for different purposes. The ScriptingGuys have a great article on WMI Explorer and you can download it here


Popular posts from this blog

CMPivot, Run Script, & Client Notification (Again!)

Run Scripts with Parameters in MEMCM (R.I.P. SCCM)

SCCM CMPivot and Run Scripts