by Dana Daugherty
To build a query- while in the SMS Console open up the query tree, right click on Queries, select New
Query. Enter a name in the text box (e.g.MS Project). Select Edit
Query Statement. On the General Tab select the star symbol, then
hit the select button. Set the Attribute Class to Computer System
and Attribute to Name. Select OK. On the general tab select
ascending for the sort order then OK. You should now be looking at
the Query Statement Properties sheet…
To build a query- while in the SMS Console open up the
query tree, right click on Queries, select New Query. Enter a name in the text
box (e.g.MS Project). Select Edit Query Statement. On the General Tab select the
star symbol, then hit the select button. Set the Attribute Class to Computer
System and Attribute to Name. Select OK. On the general tab select ascending for
the sort order then OK. You should now be looking at the Query Statement
Properties sheet. From here select the Criteria Tab. Next select the star symbol
to create a criteria. Hit the select button on the General tab, set the
Attribute Class to Software Files and the Attribute to File Name, then hit OK.
Set the Operator to “is equal to” and the value to Winproj.exe. Hit the
value button if you want to select another file name. Select OK to each page
until you reach the console.
To restrict the above query to a specific SMS site use one of
the following 2 methods.
- Go
to the properties of the query you want to restrict. Select Edit Query
Statement, then the criteria tab, then select the star symbol to add another
criteria. Hit the select button and use for System Resource for the
Attribute Class and SMS Assigned site for the Attribute. Hit OK be sure the
Operator is “is equal to” and make the value specific to the assigned
site you need to get info about. Select OK. On the Criteria Tab be sure the
operators reflect the query you want, e.g. “or” instead of “and”.
Just double click on the operator you want to change. Select OK until you
get back to the Console screen.
- Another
way to restrict to a specific site is to go to the query properties,
select Limit to Collection and browse to a collection to use to limit
your query results.
One more tip- use the “canned” queries to their fullest. Go to the
propertiesEdit Query Statementshow query language. Copy the SQL and paste it
into a new query that you create. Go to the propertiesCriteria and adjust them
to your needs.