MDT pulls database info but won't use it in target computer

TJ Scott 1 Reputation point
2022-10-07T00:04:25.1+00:00

Hey guys. I’m having trouble with MDT using the database data when deploying. Specifically, I’m trying to rename the computers that we’re deploying. I can see where the task sequence does pull the name from the database. When I set the parameter: SkipComputerName=NO, I can see where MDT has pulled the computer name from the database. Just now, I thought maybe if I manually change the computer name it would work. But it did not. Do you have any ideas on what I’m doing wrong? My Rules looks like this:
[Settings]
Priority=Init, CSettings, Default
Properties=MyCustomProperty

[Init]
UserID=xxxxxx
UserPassword=xxxxxxxx
UserDomain=xxxxxxxxx

[Default]
SLShareDynamicLogging=\xxxxxxxx\DeploymentShare$\logs\%computername%
_SMSTSORGNAME=xxx
OSInstall=YES
SkipCapture=YES
SkipComputerName=NO
SkipAppsOnUpgrade=YES
SkipAdminPassword=YES
SkipProductKey=YES
DeploymentType=NEWCOMPUTER
SkipUserData=YES
SkipLocaleSelection=YES
SkipTaskSequence=NO
SkipComputerBackup=YES
SLShare= c:\DeploymentShare\logs

SkipTimeZone=YES
TimeZone=020
TimeZoneName=Central Standard Time

SkipDomainMembership=YES
SkipDomainJoin=YES
SkipApplications=YES
SkipBitLocker=YES
SkipRoles=YES
SkipSummary=YES
SkipFinalSummary=YES
EventService=http://xxxxxxx:9800

[CSettings]
SQLServer=xxxxxxx
Instance=SQLEXPRESS
Database=MDT01
Table=ComputerSettings
Netlib=DBNMPNTW
SQLShare=logs$
Parameters=UUID, AssetTag, SerialNumber, MacAddress
ParameterCondition=OR
OSDNewMachineName=%OSDComputerName%
HostName=%OSDComputerName%
ComputerName=%OSDComputerName%

Microsoft Deployment Toolkit
Microsoft Deployment Toolkit
A collection of Microsoft tools and documentation for automating desktop and server deployment. Previously known as Microsoft Solution Accelerator for Business Desktop Deployment (BDD).
840 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. CherryZhang-MSFT 6,481 Reputation points
    2022-10-07T09:38:02.047+00:00

    Hi @TJ Scott ,

    Thanks for posting in our Q&A.

    1, How do you want to name your computer? Pull from the database or manually?

    2, Please check your SMSTS.log and BDD.log. It will record the naming details.

    3, I did some research on this issue. For this experiment, we may refer to the following links:
    https://www.youtube.com/watch?v=56GuD82r2Y4&list=PL9BW7OU-RhNGSnpTp33LydSckx40dnF4w&index=1
    https://www.youtube.com/watch?v=3WcBMR5id80&list=PL9BW7OU-RhNGSnpTp33LydSckx40dnF4w&index=2
    https://www.youtube.com/watch?v=SaSZPs8yPhQ&list=PL9BW7OU-RhNGSnpTp33LydSckx40dnF4w&index=3
    https://www.youtube.com/watch?v=884DNL1ZiFI&list=PL9BW7OU-RhNGSnpTp33LydSckx40dnF4w&index=4
    Note: Microsoft provides third-party contact information to help you understand the problem. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.

    4, Furthermore, can you share your reference articles and discuss together?

    If I misunderstand something, please let me know. Looking forward to your reply.


  2. TJ Scott 1 Reputation point
    2022-10-12T22:40:48.183+00:00

    Something in the Task Sequence is clearing the OSDComputerName variable. I don't know where to find what I'm looking for; I've looked at logs til I'm cross-eyed and can't see where the variable is getting cleared or replaced.

    0 comments No comments

  3. TJ Scott 1 Reputation point
    2022-10-12T23:56:14.333+00:00

    I am running a standalone MDT server. I.e., no Active Directory and no SCCM. I just found a line of code in ZTIGather.wsf that appears to indicate that SCCM is required. It reads:
    If oEnvironment.Item("DeploymentMethod") = "SCCM" and oEnvironment.Item("OSDComputerName") = ** Then
    oEnvironment.ITEM("OSDComputerName") = oEnvironment.Item("_SMSTSMACHINENAME")

    Also, a line in ZTIGather.xml that connects ConfigMgr from SCCM, to the variable, OSDComputerName:
    <property description="The new computer name to assign to the computer (used with ConfigMgr) " Overwrite="false" type="string" id="OSDComputerName"/>

    Is SCCM required in order to rename a computer while imaging?

    0 comments No comments

  4. CherryZhang-MSFT 6,481 Reputation points
    2022-10-20T08:53:50.953+00:00

    Hi @TJ Scott ,

    As far as I know, if you just rename the machine at image time, SCCM is not required.

    1, Please let me know how you identify the computer.

    2, How you edit the rules? I did it in the following way:
    252357-a.png

    > I thought maybe if I manually change the computer name it would work.

    3, What is mean of this sentence? Can you see the expected name in the computer details screen? In my test, I identify my computer by MAC address. I can get the expected name and the name was changed after the installation was successful. The screenshots for your reference:
    252376-b.png

    252402-c.png

    252392-d.png

    252393-e.png

    4, Furthermore, I also did another test for your reference. Identify the computer by location, Change the name to wx- + UUID last eight digits. In this test, I also got the expected name. After that, I changed the name and get the expected name again. The screenshot for your reference:

    252309-f.png

    252366-g.png

    252330-h.png

    252394-i.png

    Thank you for your time and patience!

    Best regards,

    Cherry