Windows 7 / Networking

Windows 7 Offline Domain Join

Offline domain join is a new feature in Windows 7 and Windows Server 2008 R2 that lets you join a computer to a domain without contacting a domain controller directly. This feature can add computers to a domain when network connectivity is not available. When a computer joins a domain, trust relationships change between both the computer and the Active Directory domain. Prior to Windows 7 and Windows Server 2008 R2, there was no application to make these relationship changes on the computer unless it was directly connected to the domain controller at the time it joined the domain. Windows 7 and Windows Server 2008 R2 include the application djoin.exe located on %SystemDrive\Windows\System32\djoin.exe to perform this task. The general process for using offline domain join is simple:

  1. Create the computer account on the Active Directory.
  2. Force the replication of the secrets of the computer that is going to join the domain.
  3. Use djoin.exe to output the relevant state information that the computer will use to connect to the domain to a text file.
  4. Run the text file on the computer using djoin.exe and when it reboots, it will be joined to the domain.

This tool can be used to deploy Windows 7 computers using the unattended .xml file as it now includes a section for offline domain join.

Djoin.exe must be run with an elevated command prompt. Running djoin. exe /? will display the available commands. As the examples show, to provision a computer account to a domain, you will need to use djoin.exe /PROVISION /DOMAIN <DomainName> /MACHINE <ComputerName> /SAVEFILE <FilePath> on a computer that is on the domain or the domain controller itself. Ensure the computer name has been added to the domain. Then on the local machine that is offline or on the domain run in an elevated command prompt: djoin.exe /requestodj / loadfile <filepath> /windowspatch <%WindowsDirectory%>

Warning The text file that is generated from djoin.exe must be kept in a secure location as it may allow unauthorized computers to join the domain. Due to this feature being relatively new, attackers have not yet exploited it; so, use caution when moving the text file.

[Previous] [Contents] [Next]