none
OSDComputerName variable does not set the computer name - Windows 10 x64 RRS feed

  • Question

  • I have an MDT deployment that I have been using for quite some time and has worked well.  I have the task sequence prompt for a password at the beginning of the task sequence, which has worked until recently when I updated my image with Windows updates. Now, the computer is no longer named what is entered at the prompt.  I have found that the OSDComputerName variable does get set properly, but at the end of the task sequence, the computer is named by Windows (DESKTOP-Random characters).  This was originally occurring on Windows 10 x64 1607, I decided to build a new deployment from scratch using the 1703 build, the issue is still there.  Any ideas?
    Monday, June 19, 2017 7:47 PM

All replies

  • Not sure what's going on here. 

    Check your unattend.xml file in the \\server\deploymentshare$\control\tasksequence\unattend.xml file is not hard coded to something.  Then Press F8 during the WinPE phase of your deployment, when done, check the c:\minint\unattend.xml file, that should be set to whatever you typed in the wizard. 

    If you are still having problems, please copy your c:\minint\unattend.xml file, and the bdd.log file to a public share like onedrive, and share the link.


    Keith Garner - Principal Consultant [owner] - http://DeploymentLive.com

    Tuesday, June 20, 2017 4:12 AM
    Moderator
  • Thanks for the reply, I shall investigate what you have proposed.  Oddly enough, the logs show no errors.  I have fixed this issue with a 7 line VBScript in the mean time, I run this in a task sequence step just before the step that joins the machine to the domain.  The script uses the OSDComputerName variable and injects its value into the proper registry values, works great.
    Tuesday, June 20, 2017 1:57 PM
  • I am having the exact same issue. I have tried re-creating my image thinking it might of been a sysprep issue along the way but the logs show no errors. Would you mind sharing the script that you are currently using to resolve the naming issue? Thanks for your time.
    Friday, July 21, 2017 1:59 PM
  • A extra script should not be necessary. 

    If you are still having problem, please share your bdd.log file and c:\minint\unattend.xml file to a public share like one drive and share the link.


    Keith Garner - Principal Consultant [owner] - http://DeploymentLive.com

    Friday, July 21, 2017 3:26 PM
    Moderator
  • Hi Keith,

    I know this is an old issue, but I am experiencing it now. I've looked through all the scripts and process that I can think of, without much success. I will appreciate it if you can help, thanks

    Tuesday, May 14, 2019 3:25 PM
  • Hi, did you ever get this issue fixed? If yes would you care sharing what the fix was. I have a similar issue, during the 1809 build, you're prompted to enter the user name, however at the end of the process, the computer is named randomly like WIN-F9DRKS721RB. I will appreciate if you can point me in the right direction.


    Wednesday, May 15, 2019 11:37 AM
  • Hello,

    Most probably Serial Number is exceeding to 15 Characters limit. That's why MDT is assigning the random device name to deployed devices.  Try this one!!

    OSDComputername=PC-#Right("%SerialNumber%",4)#
    This will name the system with the  last four of the serial.

    Reference link

    Wednesday, May 15, 2019 12:15 PM
  • Hi Jitesh, thank you for the reply. Mine isn't set to use serial numbers. The technician is supposed to enter asset tag name, but this doesn't seem to accepting it, but rather generating its own names randomly.

    Wednesday, May 15, 2019 12:46 PM
  • This just started happening to me as well. We have been using OSDComputerName variable with the Unknown Computers collection and that has worked for years. Suddenly, starting last week, the value entered for OSDComputerName is no longer being applied to the machine being imaged; instead, one is being randomly generated that starts with "WIN-".

    UPDATE: In looking at this issue, I found the following thread. Within that, it was discussed that when applying a Win 10 image to the same machine it was captured from, this naming issue appears, but only on that system. I have confirmed that other machines are named properly.
    Tuesday, June 4, 2019 7:41 PM
  • We're having this exact issue and ours is not the same computer. Our gold is a converted WIM from hyper-v. Anyone else resolved this issue? 
    Wednesday, June 19, 2019 10:12 PM