Search This Blog

Saturday, August 8, 2009

Part 119:- Create Query within sccm

On previous article: Part 113 - Create Collection for software update, i have created a direct collection for the Test Group collection and we have tested to deploy software update in the Test Group. Everything went out fine and we are ready to deploy software update to production system with sccm client installed. But before that let review on collection first.

By default, after you install SCCM, the console will display a predefined collection as listed below:-
Discovered computer will listed in the collection according to membership rules. Let look at All systems collection.

In the above collection, we can see all computer either sccm client installed or not install. So we may want to filter the collection based on changing environment.

eg:- Display computer Windows Server 2008 OS with only sccm client installed.

Predefined collection is not sufficient and this is where "Query Based Collection" come in.

Let start to create a new query
1. Go to Computer Management > Queries > Right Click > Create New > Queries

2. Give a name for a query. E.g:-Win2k8 with client installed. And click Edit Query Statement

3. Query Statement Properties is Open. Click on Criteria Tab and select Yellow star icon to start create the criteria

4. You need to create 2 criteria:-
a)Criteria 1 : Query for client with had installed with sccm client agent
-Criterion Type: Simple Value
Attribute class:- SMS Advanced Client State
Attribute: Version
Operator :- is greater than
Value: 0

Note: Value 0 means computer without agent install will has 0 value. Those with sccm client agent will have value greater than 0 depend on sccm version.

b) Criteria 2: Query computer with the operating system Windows Server 2008
-Criterion Type: Simple Value
Attribute class:- Operating system
Attribute: Name
Operator :- is like
Value: %Microsoft R Windows Server R 2008%

% = any string
The final result will be:-

5. Then you should define the attribute/result display. Click on General tab.

eg: Display Computer name and Ip Address

Click on the yellow star

-Attribute class: system Resource
-Attribute: Name

-Attribute: System resource
Attribute:- IP Address

Tick Omit duplicate rows (select distinct) to only display 1 record for each system. If this option is not tick, the system will display all agent install for each client.

Click Ok and Next until Finish button to complete the query creation.

Go to "Win2k8 with client installed" query to verify.

All computer which contain Windows Server 2008 with SCCM client agent installed is displayed.

Lab exercise(optional for you to practice):-
1. Create Windows XP with sccm client installed
2. Create Windows Vista with sccm client installed
3. Create Windows Server 2003 with client installed

In the upcoming article, i will look into create collection based on the queries created and link the collection.