red9r Posted October 22, 2013 Report post Posted October 22, 2013 I am trying to create a task sequence step that only runs when the first 6 characters of the computer name equal a certain string. From what I can tell, I can't use a wildcard or logic in the Task Sequence Variable Condition under the Options tab. Example: Given the following computer names, ABCDEF001, ABCDEF002, and BCDEFG001, the task sequence step should only run on ABCDEF001, and ABCDEF001. It should not run on BCDEFG001. I have tried: Task sequence variable OSDComputerName equals ABCDEF% Task sequence variable OSDComputerName equals ABCDEF* Task sequence variable OSDComputerName equals ABCDEF$ Task sequence variable #Left("%OSDComputerName%",6)# equals ABCDEF Any suggestions on how I might go about accomplishing this? I have also tried creating another variable in customsettings.ini that takes the first six characters of the computer name but it does not work because customsettings.ini is processed before the computer name is submitted. Quote Share this post Link to post Share on other sites More sharing options...
Jorgen Nilsson Posted October 22, 2013 Report post Posted October 22, 2013 Hi, That is correct you cannot use wildcards for tasksequence variables, I would suggest that you put it in a script instead and do you logic there and return a task sequence variable based on the result. Regards,Jörgen Quote Share this post Link to post Share on other sites More sharing options...
red9r Posted October 23, 2013 Report post Posted October 23, 2013 Hi, That is correct you cannot use wildcards for tasksequence variables, I would suggest that you put it in a script instead and do you logic there and return a task sequence variable based on the result. Regards, Jörgen I thought about that but here is the problem I run in to with that. OSDComputerName is originally set with the userexit script. During the LTI deployment, the user has the option to change the computer name. If the name is changed, the new variable (also created in the userexit script) does not reflect the change because the script has already ran. I'm guessing my only other option is to create a separate script to set the variable and new task sequence step to run the script. Quote Share this post Link to post Share on other sites More sharing options...
Adam_Nox Posted May 21, 2019 Report post Posted May 21, 2019 Sorry to necro this, but is it still the case that you cannot use wildcards of any type inside a task sequence variable, dynamic or regular? edit: It appears ? and * can be used. Quote Share this post Link to post Share on other sites More sharing options...