Query for direct membership based collection that runs a mandatory task sequence.
Does anyone know of a quick fast and dirty query that will NOT allow a task sequence to run if the system name begins with "NT"? If I placed it in the first grouping, then then rest of the sequence shouldn't execute, correct?
May 16th, 2012 3:49pm

would this do the trick?
Free Windows Admin Tool Kit Click here and download it now
May 16th, 2012 3:56pm

Does anyone know of a quick fast and dirty query that will NOT allow a task sequence to run if the system name begins with "NT"? If I placed it in the first grouping, then then rest of the sequence shouldn't execute, correct? It will not execute everything that's within the grouping, so in your case you should create a top group to achieve that. I haven't ever used it like that but I would think that you can use the SMSTSMachineName for that. Why making sure that a Task Sequence will never get with a client like that? For example exlcude them from the collection...My Blog: http://www.petervanderwoude.nl/ Follow me on twitter: pvanderwoude
May 16th, 2012 4:07pm

That's what I was just thinking, If I make a "Master" collection and group everything under it with the query on the master group, would it apply to the "subgroups". Do you mean excluding them by client platforms? ( in the task sequence properties).
Free Windows Admin Tool Kit Click here and download it now
May 16th, 2012 4:13pm

That's what I was just thinking, If I make a "Master" collection and group everything under it with the query on the master group, would it apply to the "subgroups" Correct. Do you mean excluding them by client platforms? ( in the task sequence properties). That's a possibilty, but that doesn't work for PXE boot. I would more think about making sure that they are just not part of the collections that you use for OS Deployments. My Blog: http://www.petervanderwoude.nl/ Follow me on twitter: pvanderwoude
May 16th, 2012 4:21pm

testing the theory now :)
Free Windows Admin Tool Kit Click here and download it now
May 16th, 2012 4:23pm

Ok, I renamed a test workstation to "NTUMC0123456" and advertised a mandatory push of windows 7 to it. It kicked off with the rule in effect. Do you think my wildcard character is the cause? It's the only thing I can think of and don't know what else to use besides "%" as a wildcard. The rule is as follows,( notice is is applied to the uppermost group named "filter" and everything else is nested within it).
May 18th, 2012 8:56am

We can't exclude client platforms because we have production workstations with xp and 7 scattered around the university in server roles. Their naming convention is "UMC0xxxxxx"
Free Windows Admin Tool Kit Click here and download it now
May 18th, 2012 8:59am

Hmm that's true you can only use (not) equals That would mean, if this is really what you want, that you would need to create a script that checks the computername and just returns a true or false and that you use that to filter them out. I can't imagine that there are no easier ways to acomplish what you want.. Why is it that you want to exclude the clientnames like this?My Blog: http://www.petervanderwoude.nl/ Follow me on twitter: pvanderwoude
May 18th, 2012 9:24am

NT, DR, TS, and TL are our server naming conventions depending on it's function. We had a field tech accidental push windows 7 to a production server using our webservice deployment page. I just plugged in "_SMSTSMachineName" instead of "system name" and am going to give that a try. Why would I only be able to use not equals? My rule logically makes sense.......
Free Windows Admin Tool Kit Click here and download it now
May 18th, 2012 9:34am

_SMSTSMachineName didn't work. The task sequence kicked off.....Can you point me in a direction on how to solve this Peter? I'm horrible @ scripting!
May 18th, 2012 9:42am

I did it just really quick, but I think this should get you started: dim env dim machineName set env = CreateObject("Microsoft.SMS.TSEnvironment") machineName = env("_SMSTSMachineName") ' If the first two letters of the machinename equals NT If Left(machineName,2)="NT" Then ' Set own custom variable to true env("MyCustomVariable") = "True" End If MyCustomVariable is then what you can use in your Task Sequence. An other maybe easier option is to just make sure that not every machine is in a collection which has a OS Deployment advertised...My Blog: http://www.petervanderwoude.nl/ Follow me on twitter: pvanderwoude
Free Windows Admin Tool Kit Click here and download it now
May 18th, 2012 10:13am

thank you sir!
May 18th, 2012 10:17am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics