Avatar of netfriendsinc
netfriendsinc
 asked on

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
Windows 10* MDT* Deployment Image Servicing and Management (DISM)

Avatar of undefined
Last Comment
netfriendsinc

8/22/2022 - Mon
aravind anche

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 Galiher

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 anche

Also you can add computer name
OSDComputerName=desktop-%SerialNumber%
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
netfriendsinc

ASKER
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?
netfriendsinc

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

Normally I delete the machine from AD before imaging.
https://mdtguy.wordpress.com/2017/08/28/joining-the-domain-with-mdt/
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
aravind anche

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)
netfriendsinc

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

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
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
aravind anche

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

ASKER
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.
netfriendsinc

ASKER
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.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
aravind anche

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

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

ASKER
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"
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
aravind anche

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

ASKER
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 anche

can you check ztigather.log if it is taking computername
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
netfriendsinc

ASKER
Where is that located? I can't find it
netfriendsinc

ASKER
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 anche

%WINDIR%\TEMP\DeploymentLogs

also SkipAdminPassword=YES
Are you specigying password somewhere?
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
aravind anche

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

ASKER
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 anche

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
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
aravind anche

I just deployed on a machine, I see logs there
netfriendsinc

ASKER
SkipBDDWelcome=YES  is that what you mean?
netfriendsinc

ASKER
c:\windows\temp  does not have a deploymentlog folder
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
aravind anche

yours should be the easy one, something is wrong
netfriendsinc

ASKER
haha i agree :)
aravind anche

[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
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
netfriendsinc

ASKER
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 anche

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

OSDComputerName=!fill
add this and try it should prompt
Your help has saved me hundreds of hours of internet surfing.
fblack61
netfriendsinc

ASKER
yes i can add with the provided user/pass in CS.ini
netfriendsinc

ASKER
rgr that, standby
netfriendsinc

ASKER
didn't prompt
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
aravind anche

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 anche

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
netfriendsinc

ASKER
will do, hold on
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
netfriendsinc

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

ASKER
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 anche

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?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
netfriendsinc

ASKER
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 anche

it should process rules
netfriendsinc

ASKER
it asks for a rule file:  ?
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
aravind anche

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
netfriendsinc

ASKER
okay ill try that , hold on
netfriendsinc

ASKER
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
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
netfriendsinc

ASKER
same thing is still happening.
aravind anche

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

so there is no ztigather log, in windows temp deploymentlogs? look for that too
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
netfriendsinc

ASKER
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.
netfriendsinc

ASKER
there is no deploymentlog folder in Temp -- just isn't there, not hidden or otherwise
aravind anche

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.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
netfriendsinc

ASKER
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!
netfriendsinc

ASKER
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.
netfriendsinc

ASKER
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
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
aravind anche

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
netfriendsinc

ASKER
I set skipdomainjoin=no

attached are TS screenshots
ts1.jpg
ts2.jpg
aravind anche

add recover from domain ad the end and choose auto rerun
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
netfriendsinc

ASKER
Okay so like this?
ts3.jpg
aravind anche

yes, copy the step and [lace it at the end
netfriendsinc

ASKER
Still joining the computer to a workgroup :(
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
ASKER CERTIFIED SOLUTION
aravind anche

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
netfriendsinc

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

ASKER
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!