Need to set computername during required required task sequence

Sean lehne 6 Reputation points
2021-07-14T16:40:43.827+00:00

We have the task sequence for Windows 10 21H1 as required so we don't get the option to set the computername like when we do it available.

Anyone have any solutions with setting the computer name when setting the deployment as required.

Microsoft Configuration Manager Deployment
Microsoft Configuration Manager Deployment
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Deployment: The process of delivering, assembling, and maintaining a particular version of a software system at a site.
942 questions
Microsoft Configuration Manager
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Gary Blok 1,736 Reputation points
    2021-07-14T16:58:02.547+00:00
    • If the machine is already in CM, it will grab the same name. So you can pre-populate the machine in CM as a potential solution.
    • You can script with PowerShell a way to dynamically assign the name of the machine, then set the OSDComputerName variable to that dynamic name very early in the TS. (Before the Apply Windows Setting Step

    More info about Apply Windows Settings: https://docs.recastsoftware.com/ConfigMgr-Docs/TaskSequence/SCCM-TaskSequence-Step-Apply-Windows-Settings.html

    Do you have a naming standard you want applied? Or do you auto generate the name based on Serial Number or something?

    0 comments No comments

  2. AllenLiu-MSFT 43,061 Reputation points Microsoft Vendor
    2021-07-15T07:22:11.83+00:00

    Hi, @Sean lehne
    Thank you for posting in Microsoft Q&A forum.

    How do you configure your task sequence to get the option to set the computer name?

    There is a east way to do that, choose the device collection that your TS will deploy to and view the properties, click the Collection Variables tab and click the Yellow Star icon to define a new variable.
    On the new variable window, define the variable. Specify the name as OSDCOMPUTERNAME. Ensure Do not display this value in the Configuration Manager console is checked. Do not specify anything for Value and Confirm, just leave it blank. Click OK.

    Now we should get the option to set computer name during OSD.

    Here is the details:
    https://www.prajwaldesai.com/easy-way-to-prompt-computer-name-during-osd/
    (Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.)


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  3. Sean lehne 6 Reputation points
    2021-07-19T15:21:53.05+00:00

    On the new variable window, define the variable. Specify the name as OSDCOMPUTERNAME. Ensure Do not display this value in the Configuration Manager console is checked. Do not specify anything for Value and Confirm, just leave it blank. Click OK.

    The above only works if you are making the TS available I'm making the TS required so it doesn't honor that setting.

    I'm trying to get a pop up of some sort to make the users building the machines the ability to name the machine.


  4. Sean lehne 6 Reputation points
    2021-07-19T15:23:30.977+00:00

    Gary,

    Would I be able to just do a Rename-Computer before apply Windows settings and that will work?

    Would there be a way to prompt for a variable to rename the machine possibly?