Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 36188

ConfigMgr 2012 Chassis Type Global Condition

$
0
0

What is a Global Condition?

"Global conditions in Microsoft System Center Configuration Manager 2012 are rules that represent business or technical conditions that can be used to specify how an application is provided and deployed to client devices. Global conditions can be created from the Global Conditions node of the Configuration Manager console or from within the Create Deployment Type Wizard. Global conditions are accessed and used from the Requirements page of the Create Deployment Type Wizard."

What is a Chassis and Chassis Type?

"The chassis is the physical container that houses the components of a computer. Chassis types include the tower configuration, desktop computer, notebook computer, and handheld computer."

What are the possible values for Chassis Type?

http://technet.microsoft.com/en-us/library/ee156537.aspx

What's the advantage of a Chassis Type Global Condition?

With the ability to target applications to Laptops, Desktops or Servers you can leverage the flexibility of Global Conditions within the new Application Model of System Center 2012 Configuration Manager.  When leveraging requirements within the application model you can select the Global Condition for Chassis Type which will then be evaluated before the content is downloaded from the server and does not require a collection evaluation or refresh compared to setting these types of criteria on collection queries in result making the process more efficient then the process's we had in prior versions of Configuration Manager.

How to create the Chassis Type Global Condition:

1) Launch the Configuration Manager 2012 Console and expand Application Management > Global Conditions.

2) Right click the Global Conditions Node and select "Create Global Condition"

3) On the Create Global Condition Wizard fill out the Name, Description, Device Type, Condition Type, Setting Type and Data Type.

4) Next click Add Script and select VBScript

5) Either copy and paste the script code into the window or select browse to open an already created VBScript and select Ok.

6) Select Ok to save the Global Condition

7) You should now have a new Global Condition called Chassis Type

8) Now lets put it to use.  Open the Deployment Type for any application and go to the Requirements tab and select add.

9) On the Create Requirement's Wizard select Custom Category, Chassis Type for the Condition, Rule Type equals value, Operator = equals and Value = IsLaptop, IsDesktop or IsServer depending on your need and then select Ok.

10) On the Requirements tab select ok and save your application you are now ready to deploy with a custom global condition.

 

Script Code barrowed and lightly modified from ZTIUtility.vbs in the Microsoft Deployment Toolkit.

Set objWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set objResults = objWMI.InstancesOf("Win32_SystemEnclosure")
For each objInstance in objResults

If objInstance.ChassisTypes(0) = 12 or objInstance.ChassisTypes(0) = 21 then
' Ignore docking stations
Else

Select Case objInstance.ChassisTypes(0)
Case "8", "9", "10", "11", "12", "14", "18", "21"
Wscript.echo "IsLaptop"
Case "3", "4", "5", "6", "7", "15", "16"
Wscript.echo "IsDesktop"
Case "23"
Wscript.echo "IsServer"
Case Else
' Do nothing
End Select

End if
Next

 Disclaimer: The information on this site is provided "AS IS" with no
warranties, confers no rights, and is not supported by the authors or Microsoft
Corporation. Use of included script samples are subject to the terms specified
in the
Terms of Use.


Viewing all articles
Browse latest Browse all 36188

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>