Skip to content

Wildcard Task Sequence Variables for OSD Deployment

Featured Replies

Apologies up front if this is the wrong forum, but it struck me as the closest place for the topic. I'm currently working on making a more universal deployment task sequence for multiple labs within the school district I work at. We are using SCCM 2012 SP1 at this point. My idea is to have groups within my task sequence that will only run based off of If conditions that will look at the computer's name to validate. Since I'm looking at labs, with a minimum of 25 pcs and up, putting in a condition to check for each pc name is highly impractical. Is there is a method to have it check with a wildcard method?

So you want to run the task sequence based on a value(s)? If you use the Options tab and Add Conditions you can leverage the wql "like"

 

For example:

 

WMI NameSpace: root\cimv2

WQL Query: Select * From Win32_ComputerSystem Where Manufacturer Like "Lenovo%"

 

or

 

WMI NameSpace: root\cimv2

WQL Query: Select * From Win32_ComputerSystem Where Name Like "CompLab%"

 

You can also add multiple conditions that must all be true/false for the step to run. You can use custom task sequence variables as well in your condition or even look at a file.

 

Lastly, if you are scripter, you can use that too.

 

Hope that helps.

  • Author

I already had the WMI Query, but it wasn't working. Found out that I didn't have Name capitalized. Changed it and it worked like a charm!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.