0

We are using SCCM CB Build 1710, and during an OSD to Unknown Computers, we capture the "OSDComputerName" - for example DEDS1234

What I would like to do further down the task sequence is use this same variable, in order to apply an oprating system with defined language pack (We have a single OS built, but an unattended.xml per language).

So in practice, if I want to build a German language PC, using the OSDComputerName DEDS1234, the "Apply operating system" step needs to aware that i've preset the OSDComputername to DEDS1234 - I imagine I can use a query to pick this up, simliar to IF OSDComputerName like DE______

If I then decide to build a French PC, using OSDComputerName FEDS1234 - same thing.

I have been able to in the past use a "OSDSelectOS" variable, and using 7 or 10 as the answer installed Win 7 or Win 10.

But I'm struggling to apply the same logic based on the name.

1 Answer 1

0

You would create the "Apply Operating System" multiple times - one for each language. Then in the "Options" of each of these steps you can use "Add Condition" "Task Sequence Variable" and there choose "OSDComputerName" as variable "like" as condition and something like 'DE%' and 'FE%' as the respective value.

Sign up to request clarification or add additional context in comments.

5 Comments

Any particular reason why I should use the * over something like DE% / FR% ?
So I tried this, and the TS still fails. If I pull up F8 and then request the hostname it's still set as minint-random - So despite being prompted, it's not being set.
For some reason I somehow thought WQL queries use * as a wildcard but you are absolutely right it is % so I corrected that. Now as to the minint name which is the default name. This seems to be a whole different problem as the query. Did you actually try without any sort of query if the hostname is set correctly? I mean it could be that in pe where you probably checked with f8 the hostname variable is not updated but later it would be fine so maybe you need some sort of script to really check whether the TSVariable is set correctly.
Correct - when using f8 to query the host name, it remains as minint. I have also tried to apply the logic of using the "Task Sequence Varaible" as _SMSTSMachineName as the computer name does not change until Apply windows settings has been applied.
Ok I think it is normal behavior that the hostname does not change until apply windows settings but it should not really matter. The query compares OSDComputerName and not %hostname% so as long as the OSDComputerName is really changed it should not matter for your query. So can you confirm (would probably need a script) that the OSDComputerName is really set at the time where the query should be evaluated?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.