I'm trying to build an unattended Windows 7 image script that will do a simple domain join. The catch is that the DHCP-provided DNS server knows absolutely nothing about my domain, so I need to set the DNS server to something that is aware of the domain before the UnattendedJoin
task runs. I do this with a Microsoft-Windows-DNS-Client
in the unattend.xml
.
I'm at the point where I know the DNS settings are being set, because the Local Area Connection
NIC IP settings are correct once the Win7 machine comes up. However, it never makes it to the domain. The specific error reported is:
[DJOIN.EXE] Unattended Join: Begin
[DJOIN.EXE] Unattended Join: Loading input parameters...
[DJOIN.EXE] Unattended Join: AccountData = [NULL]
[DJOIN.EXE] Unattended Join: UnsecureJoin = [NULL]
[DJOIN.EXE] Unattended Join: MachinePassword = [secret not logged]
[DJOIN.EXE] Unattended Join: JoinDomain = [domain.example.com]
[DJOIN.EXE] Unattended Join: JoinWorkgroup = [NULL]
[DJOIN.EXE] Unattended Join: Domain = [DOMAIN]
[DJOIN.EXE] Unattended Join: Username = [domainuser]
[DJOIN.EXE] Unattended Join: Password = [secret not logged]
[DJOIN.EXE] Unattended Join: MachineObjectOU = [OU=Clients,OU=Bucket,DC=example,DC=domain,DC=com]
[DJOIN.EXE] Unattended Join: DebugJoin = [true]
[DJOIN.EXE] Unattended Join: DebugJoinOnlyOnThisError = [NULL]
[DJOIN.EXE] Unattended Join: Enabled DC Locator ETW tracing. Log file: C:\Windows\Panther\UnattendGC\UnattendedJoinDCLocator.etl
[DJOIN.EXE] Unattended Join: Checking that auto start services have started.
[DJOIN.EXE] Unattended Join: Joining domain [domain.example.com]...
[DJOIN.EXE] Unattended Join: Calling DsGetDcName for domain.example.com...
Unattended Join: DsGetDcName failed: 0x54b, last error is 0x0, will retry in 5 seconds...
This error appears to mean 'I can't find the domain'. What's odd is that if I try and do a manual domain join once the install has finished, it works fine. So for some reason, even though the DNS settings are being correctly set before (I can see it further up the log file), DJOIN.EXE
isn't using them.
What's going on here?
There are a couple of options to help you join your machines to the domain in this situation.
First, because the network settings are being set in the specialize pass, you can run a script later in the process that joins the computer to the domain. In the oobesystem pass, you can use the ‘SynchronousCommand’ settings under the ‘FirstLogonCommands’ setting which is part of the Microsoft-Windows-Shell-Setup component to run a script to join the computer to the domain.
Another option is to use Offline Domain Join as explained in this TechNet article: ‘Offline Domain Join (Djoin.exe) Step-by-Step Guide’ .
More Step-by-Step guides and videos to help with your deployment needs can be found on the Deliver and Deploy Windows 7 and the Deliver and Deploy Windows 8 pages of the Springboard Series on TechNet.
Hope this helps,