Prompt for computername using MDT

netfriendsinc
netfriendsinc used Ask the Experts™
on
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
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

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
Distinguished Expert 2018

Commented:
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.

Commented:
Also you can add computer name
OSDComputerName=desktop-%SerialNumber%
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

Author

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?

Author

Commented:
@Cliff Galiher -- I just need to choose "add" then "general" then what?  I'm pretty unfamiliar with editing the task sequence.  Thank you!

Commented:
Normally I delete the machine from AD before imaging.
https://mdtguy.wordpress.com/2017/08/28/joining-the-domain-with-mdt/

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)

Author

Commented:
Aravind, I had deleted that earlier as I was using the unattend.xml file to join, but that isn't working.

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

Commented:
before doing that have you changed custom settings if so please attach those

Author

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.

Author

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.

Commented:
Have you added "MachineObjectOU=OU=New Computers,OU=Workstations,OU=PAI-Minneapolis,DC=ntserver,DC=local" in custom settings?
something like this

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. "

Author

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"

Commented:
yes in welcome page it asks for computer name,  for example if you give desktop-1234, is it not setting that?

Author

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

Commented:
can you check ztigather.log if it is taking computername

Author

Commented:
Where is that located? I can't find it

Author

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

Commented:
%WINDIR%\TEMP\DeploymentLogs

also SkipAdminPassword=YES
Are you specigying password somewhere?

Commented:
welcome page is when you start the deployment it asks for choosing TS, next computername, time

Author

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

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

Commented:
I just deployed on a machine, I see logs there

Author

Commented:
SkipBDDWelcome=YES  is that what you mean?

Author

Commented:
c:\windows\temp  does not have a deploymentlog folder

Commented:
yours should be the easy one, something is wrong

Author

Commented:
haha i agree :)

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

Author

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.

Commented:
Also as a check try to add a machine to domain using the credential you provided in customsettings and confirm it is adding

Commented:
OSDComputerName=!fill
add this and try it should prompt

Author

Commented:
yes i can add with the provided user/pass in CS.ini

Author

Commented:
rgr that, standby

Author

Commented:
didn't prompt

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

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

Author

Commented:
will do, hold on

Author

Commented:
It prompted for computer name after I removed both of those variables.  Let's see if it sticks..
1128181403.jpg

Author

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

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?

Author

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

Commented:
it should process rules

Author

Commented:
it asks for a rule file:  ?

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

Author

Commented:
okay ill try that , hold on

Author

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

Author

Commented:
same thing is still happening.

Commented:
Dang, can you create a new ts from scratch with custom wim and deploy.
Now your issue is making me more curious

Commented:
so there is no ztigather log, in windows temp deploymentlogs? look for that too

Author

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.

Author

Commented:
there is no deploymentlog folder in Temp -- just isn't there, not hidden or otherwise

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.

Author

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!

Author

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.

Author

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

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

Author

Commented:
I set skipdomainjoin=no

attached are TS screenshots
ts1.jpg
ts2.jpg

Commented:
add recover from domain ad the end and choose auto rerun

Author

Commented:
Okay so like this?
ts3.jpg

Commented:
yes, copy the step and [lace it at the end

Author

Commented:
Still joining the computer to a workgroup :(
Commented:
Can you try the script in below link
http://c-nergy.be/blog/?p=4009

Author

Commented:
Ill read over that link and get back to you, might be tomorrow - thank you!

Author

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!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial