SCCM 2007 – OSD Configuration – Naming Conventions and Task Sequence Queries

I was working on a task sequence consolidation this morning and thought I would throw this one out there in case anyone else has a similar situation.

In our environment, we have several applications which require location-specific parameters… basically, the developers have created different configuration files which are based on the site location of the end-user. If you use task sequences for both OSD and application deployment, this should work for you as well, depending upon your machine naming convention. I prefer to use a convention which is organized as such:

[Location Acronym][Unique Identifier][Departmental Acronym]

i.e.  and machine in Austin with a serial number of 123456 and a department of Technology would be AST123456TECH  –  just an example

Although the application programs have dependencies, the configuration program is the last step in the process. So, I have created the first two dependency programs and then configuration programs for each location dependent upon the last program in the dependency chain. All of these are placed in the same task sequence, in order of dependency, and then I use a WMI query to ensure that the proper configuration program is run at the end of the chain based on machine name. (Machine name just happens to be convenient for us, but you could use this same technique for anything obtainable in the WMI which could be used as a locational identifier.)

Query used for the Austin configuration program:

SELECT * FROM Win32_ComputerSystem WHERE Name LIKE “AST%”

You can follow the results in the SMSTS.log file: (I’ve taken out the time stamps)

Query = SELECT * FROM Win32_ComputerSystem WHERE Name LIKE “AST%”
Expand a string: root\cimv2
Expand a string: SELECT * FROM Win32_ComputerSystem WHERE Name LIKE “AST%”
The WMI condition expression is evaluated to be TRUE
The AND expression is evaluated to be TRUE
The condition for the action (Install – [Location Configuration Program] – AST) is evaluated to be true

Really pretty simple when you look at it, but quite handy for consolidation.

Leave a Reply