Prompt for computername using MDT

I'm using the latest version of MDT to image 80+ workstations with Windows 10 Ent x64 ver 1803.  I've created the wim image, created the deployment share, task sequence and edited the unattend file via MDT along with the customsettings.ini and bootstrap files.  I can't do PXE boot so I'm using a bootable usb stick to run the litetouch install process.  I've configured the customsettings.ini file to prompt for computername and domain, which it does.  I then enter the computer name and domain along with credentials.  The workstation names have already been created in Active Directory.  The process continues without issue and then it boots into Windows using a local admin account.  When I check system settings, the computer name is "desktop-xxxxxx" and it joined a workgroup instead of the domain.  

I think it has something to do with my unattend file, but I'm not sure.  I've attached my customsettings.ini and unattend.xml files.  I'm a bit confused with the domain join part of the unattend file under the Specialize pass: "amd64_Microsoft-Windows-UnattendedJoin_neutral" --> I've added the "identification" substring and given it the fqdn to join, but then under "credentials" I've also given it the domain name, user name and password.. perhaps that is conflicting somehow with customsettings?

summary:  I want the install to prompt for computername, then joined the domain automatically.  I had tried manually but it didn't work.
CustomSettings.ini
Unattend_edited.xml
netfriendsincAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

aravind ancheWindows/Vmware Commented:
Hello
I don't see domain join in your custom settings.ini
add
JoinDomain =
DomainAdmin =
DomainAdminDomain =
DomainAdminPassword =

add them and try.
Also
MachineObjectOU=ou= Deployment,OU= ,DC= ,DC=com

leave the default unattend.xml
Cliff GaliherCommented:
In general I don't recommend setting these in files unless necessary. MDT has a join domain task in the default task sequence that can be configured. A fairly common problem I see is when both are configured and there is conflicting info.
aravind ancheWindows/Vmware Commented:
Also you can add computer name
OSDComputerName=desktop-%SerialNumber%
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

netfriendsincAuthor Commented:
Okay, so even if the object already exists in AD I still need to add the MachineObjectOU line?  And leave out the windows-unattendedjoin from specialize?
netfriendsincAuthor Commented:
@Cliff Galiher -- I just need to choose "add" then "general" then what?  I'm pretty unfamiliar with editing the task sequence.  Thank you!
aravind ancheWindows/Vmware Commented:
Normally I delete the machine from AD before imaging.
https://mdtguy.wordpress.com/2017/08/28/joining-the-domain-with-mdt/
aravind ancheWindows/Vmware Commented:
also you don't have to add domain join step in task sequence it already there. cliff is referring to that. that step run domain join script(ztidomainjoin.wsf)
netfriendsincAuthor Commented:
Aravind, I had deleted that earlier as I was using the unattend.xml file to join, but that isn't working.
aravind ancheWindows/Vmware Commented:
any errors in bdd log?
use default unattend xml file.
delete machine from ad and run deployment.
or as a test create test deployment share and give the custom settings and connect to that
aravind ancheWindows/Vmware Commented:
before doing that have you changed custom settings if so please attach those
netfriendsincAuthor Commented:
I deleted the unattendedjoindomain from the specialize pass in unattend.xml and added these variables to the customsettings.ini:

JoinDomain=Your Domain Name – EX: Test.Local
DomainAdmin=A User that Can Join Machines to the Domain
DomainAdminDomain= Your Domain Name – EX: Test.Local
DomainAdminPassword=The DomainAdmin user’s password

I'm going back through the image process now, will let you know.
netfriendsincAuthor Commented:
Okay so the workstation was imaged successfully again, however it joined a workgroup with my domain name, not the domain, and the hostname of the computer didn't stay when I was prompted to enter it.  it's "desktop-xxxxxx" again.
aravind ancheWindows/Vmware Commented:
Have you added "MachineObjectOU=OU=New Computers,OU=Workstations,OU=PAI-Minneapolis,DC=ntserver,DC=local" in custom settings?
something like this
aravind ancheWindows/Vmware Commented:
I didn't get what you mean
"and the hostname of the computer didn't stay when I was prompted to enter it.  it's "desktop-xxxxxx" again. "
netfriendsincAuthor Commented:
I have the customsettings.ini file set to: SkipComputerName=NO  so that it prompts for a computer name during setup.  I enter the name of the computer, then it continues setup and eventually when I get into windows, it has a new hostname of "workstation-xxxxxx"
aravind ancheWindows/Vmware Commented:
yes in welcome page it asks for computer name,  for example if you give desktop-1234, is it not setting that?
netfriendsincAuthor Commented:
Problem remains, even after adding in the MachineObjectOU (start from object container and work back correct?  so OU=computer,OU=clinic,OU=hospital,DC=JHDR,DC=edu)

Not sure why the hostname is being changed either.  I've attached the CS.ini file
CustomSettings.ini
aravind ancheWindows/Vmware Commented:
can you check ztigather.log if it is taking computername
netfriendsincAuthor Commented:
Where is that located? I can't find it
netfriendsincAuthor Commented:
Updated CS.ini with MachineObjectOU=OU=Echo-DukeNorth,OU=Computers,DC=xxx,DC=edu

updating deployment share.  Also, where is the welcome page you're talking about?  I've probably skipped it in CS or unattend via Task Sequence
aravind ancheWindows/Vmware Commented:
%WINDIR%\TEMP\DeploymentLogs

also SkipAdminPassword=YES
Are you specigying password somewhere?
aravind ancheWindows/Vmware Commented:
welcome page is when you start the deployment it asks for choosing TS, next computername, time
netfriendsincAuthor Commented:
yea i had looked there, but there is no deploymentlogs in Temp folder, nothing hidden either.  I specify the password for the user that has join rights to the domain in the CS.ini file:

DomainAdminPassword=xxxxxxxx
aravind ancheWindows/Vmware Commented:
sorry I was wrong you have domain name as dhe.duke.edu
so
MachineObjectOU=ou=Echo-DukeNorth,OU=Computers,DC=xxx,DC=xxxx,DC=edu
aravind ancheWindows/Vmware Commented:
I just deployed on a machine, I see logs there
netfriendsincAuthor Commented:
SkipBDDWelcome=YES  is that what you mean?
netfriendsincAuthor Commented:
c:\windows\temp  does not have a deploymentlog folder
aravind ancheWindows/Vmware Commented:
yours should be the easy one, something is wrong
netfriendsincAuthor Commented:
haha i agree :)
aravind ancheWindows/Vmware Commented:
[Settings]
Priority=Default
Properties=MyCustomProperty

[Default]
OSInstall=Y
MachineObjectOU=OU=Echo-DukeNorth,OU=Computers,DC=dhe,DC=duke,DC=edu
SkipAdminPassword=YES
AdminPassword=xxxxxxxxxxx
SkipApplications=YES
SkipBitLocker=YES
SkipCapture=YES
SkipProductKey=YES
SkipUserData=YES
SkipComputerBackup=YES
SkipComputerName=YES
OSDComputerName=Desktop#Left("%Serialnumber%",4)#
SkipComputerBackup=YES
SkipDomainMembership=YES
JoinDomain=dhe.duke.edu
DomainAdmin=fmz2
DomainAdminDomain=dhe.duke.edu
DomainAdminPassword=xxxxxxx
SkipFinalSummary=NO
SkipLocaleSelection=YES
KeyboardLocale=en-US
UserLocale=en-US
UILanguage=en-US
SkipTimeZone=YES
TimeZoneName=Eastern Standard Time
SkipUserData=Yes
netfriendsincAuthor Commented:
Sorry I wasn't clear on that.. but I want to be prompted each time so I can enter a unique hostname for each workstation.  I had this configured in win7 x64 and it worked everytime, now with win 10 it doesn't.  

So during the setup process I had SkipComputerName=NO -- it would prompt for a computer name, which I would enter, then click okay and the rest of the process was automated, only to find that it was giving it a different hostname when I got into Windows than what I had entered.  I don't have a database of names to draw from to auto name the workstations.
aravind ancheWindows/Vmware Commented:
Also as a check try to add a machine to domain using the credential you provided in customsettings and confirm it is adding
aravind ancheWindows/Vmware Commented:
OSDComputerName=!fill
add this and try it should prompt
netfriendsincAuthor Commented:
yes i can add with the provided user/pass in CS.ini
netfriendsincAuthor Commented:
rgr that, standby
netfriendsincAuthor Commented:
didn't prompt
aravind ancheWindows/Vmware Commented:
this is what I have
[Settings]
Priority=Default
Properties=MyCustomProperty

[Default]

OSInstall=Y
_SMSTSOrgName=Organization

SkipBDDWelcome=YES
UserID=Username
UserDomain=domain
UserPassword=Password
SkipDomainMembership=YES
SkipAppsOnUpgrade=YES
SkipCapture=YES
SkipAdminPassword=YES
SkipProductKey=YES
SkipDeploymentType=YES
SkipTaskSequence=YES
TaskSequenceID=DEPLOYWIN10V2
SkipSummary=YES
SkipUserData=YES
SkipComputerName=YES
OSDComputerName=AA#Left("%Serialnumber%",9)#
SkipAdminPassword=YES
SkipProductKey=YES
SkipPackageDisplay=NO
SkipLocaleSelection=YES
SkipBitLocker=YES
SkipTimeZone=YES
TimeZone=020
TimeZoneName=Central Standard Time
JoinDomain=domain
DomainAdmin=domain\user
DomainAdminPassword=password

SLShareDynamicLogging=\\servername\D$\MDTLogs\%OSDComputerName%

Bootstrap.ini:

[Settings]
Priority=Default

[Default]
DeployRoot=\\servername\DeploymentShare$
UserID=username
UserDomain=domain
UserPassword=password
KeyboardLocal=en-us
SkipBDDWelcome=YES
aravind ancheWindows/Vmware Commented:
ok lets remove the
SkipComputerName=No line completely
remocve OSDComputerName too

note:when we make change in customsetting we don't need to update deployment share
netfriendsincAuthor Commented:
will do, hold on
netfriendsincAuthor Commented:
It prompted for computer name after I removed both of those variables.  Let's see if it sticks..
1128181403.jpg
netfriendsincAuthor Commented:
Okay so the computer name changed again, so it's happening sometime after I manually input the desired hostname, and then when domain join happens, it can't b/c of the computer name so it makes it a workgroup.
1128181414.jpg
aravind ancheWindows/Vmware Commented:
What computername you gave?
is there anything in Tasksequence causing that?
Is there any group policy?
also what is the serial number, is it matching the name?
netfriendsincAuthor Commented:
i'm giving it echo-dt-821
Hmm.. there is a "gather local only" under "Preinstall" and the "gather only local data (do not process rules)" radial button is selected - perhaps that's causing it?

No GPO and the serial number does not match the workstation name it was given
aravind ancheWindows/Vmware Commented:
it should process rules
netfriendsincAuthor Commented:
it asks for a rule file:  ?
aravind ancheWindows/Vmware Commented:
point to custom setting file, but it never did that we will try.
the file should be in deployment share, if iam not wrong control folder
netfriendsincAuthor Commented:
okay ill try that , hold on
netfriendsincAuthor Commented:
okay selecting the rules file:  and then leaving it blank makes the deployment search for the CS.ini file -- ill try that, but have my doubts
netfriendsincAuthor Commented:
same thing is still happening.
aravind ancheWindows/Vmware Commented:
Dang, can you create a new ts from scratch with custom wim and deploy.
Now your issue is making me more curious
aravind ancheWindows/Vmware Commented:
so there is no ztigather log, in windows temp deploymentlogs? look for that too
netfriendsincAuthor Commented:
The WIM image I'm currently using is one I made using the latest WINPE for windows 10 1809 (I'm using win 10 ent x64 1803) I then imported that wim file when creating the deployment share.  I did this with win 7 x64 without issue.  Should I just start the entire process over?  close deployment share, create a new one, import the wim file, and then edit the default TS and just use CS.ini like we did today for computer name/domain/etc?  

ugh.
netfriendsincAuthor Commented:
there is no deploymentlog folder in Temp -- just isn't there, not hidden or otherwise
aravind ancheWindows/Vmware Commented:
Don't close the deployment share, just create new TS and with same file and keep TS default. use same customsettings
if this wont work we will do later.
netfriendsincAuthor Commented:
okay sounds good, I do have to modify the TS a bit to tell it where to install the OS and which volume to format etc.  I'll get to this tomorrow, gotta run home - thanks for all the help today, check back in the morning!
netfriendsincAuthor Commented:
Okay I'm back!  I've created a new default TS and cleaned it up a touch, modified it to point to the OS and which drive/volume and made the OS partition bootable.  I'm going to try it now with the same CS.ini file and see what happens.
netfriendsincAuthor Commented:
So it took a little longer to image, but the hostname is correct now!  However, it still joins the computer to a workgroup and not the domain
aravind ancheWindows/Vmware Commented:
ok one worked.
can you remove skipdomain join from cs and run, and give domain name manually
also add recover from domain at end of task sequence
can you post TS screenshot
netfriendsincAuthor Commented:
I set skipdomainjoin=no

attached are TS screenshots
ts1.jpg
ts2.jpg
aravind ancheWindows/Vmware Commented:
add recover from domain ad the end and choose auto rerun
netfriendsincAuthor Commented:
Okay so like this?
ts3.jpg
aravind ancheWindows/Vmware Commented:
yes, copy the step and [lace it at the end
netfriendsincAuthor Commented:
Still joining the computer to a workgroup :(
aravind ancheWindows/Vmware Commented:
Can you try the script in below link
http://c-nergy.be/blog/?p=4009

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
netfriendsincAuthor Commented:
Ill read over that link and get back to you, might be tomorrow - thank you!
netfriendsincAuthor Commented:
powershell script and adding joindomain w/ the script location in the TS worked - thank you for all your help over the last week!  Much appreciated!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 10

From novice to tech pro — start learning today.