7

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?

growse
  • 7,830
  • 11
  • 72
  • 114
  • There are a few different places that you can set `Microsoft-Windows-DNS-Client`. Which installation pass do you have this set in? Specialize? – MDMarra Mar 07 '13 at 17:31
  • I'm setting it in 4: Specialize, which is where the unattended join is also happening. – growse Mar 08 '13 at 09:24
  • I've tried adding DNS settings into 1: WinPE, but that makes no difference. I'm suspecting that it doesn't have the NIC drivers in the WinPE instance... – growse Mar 12 '13 at 12:18
  • If it didn't have NIC drivers in the boot image, it would never start installing. – MDMarra Mar 12 '13 at 13:51
  • Why not? I'm installing from a USB drive, so why would it need the nic drivers to proceed with the install? In any case, I added them in into the WinPE image, and still no difference. I'm going down the 'Powershell in a oobe SynchronousCommand' route now... – growse Mar 12 '13 at 13:54
  • Sorry, didn't realize you had the install image on a USB disk. – MDMarra Mar 12 '13 at 14:04
  • 1
    I know this is old but I'm also having this problem (using SCCM). dcdiag /test:DNS reports no errors and I can ping the domain and all domain controllers from a command prompt in WinPE. – Matt Oct 21 '15 at 23:38

1 Answers1

1

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,

dwolters
  • 1,255
  • 7
  • 11