Offline domain join is a new process that allows Windows machines running on Windows 7 or later (Windows Server 2008 R2 or later) to join a domain without contacting to the domain controller. It means it allows to join Windows machines to a domain in locations where there is no connectivity between domain servers and domain members.
There are two methods to join a Windows client to the Active Directory domain. These are:
- Online Domain Join: Typically used when both the domain server and windows client are connected and able to communicate to each other.
- Offline Domain Join: Typically used when domain server and Windows client are not connected to each other.
In order to perform offline domain joining, you have to use the djoin.exe command-line tool. In order to use the djoin.exe command, the user must have the rights to join workstations to the domain. By default, members of the Domain Admins group have the necessary rights to perform offline domain joining process.
Steps to Perform Offline Domain Join
To demonstrate the offline domain joining process, we are going to use a domain server running on Windows Server 2016 and a client running on Windows 10. The domain name is mcsalab.local. To perform the offline domain join, first. you need to create a provision file on the domain controller (named DC1). Next, copy this file on the client (named CLEINT1) and then use this file to join to the domain. The following syntax is used to create the provision file.
djoin /provision /domain <domain name> /machine <client machine name> /savefile <file name>
- Look at the following example. Here, we create an ODJ file on DC1 to join CLIENT1 to mcsalab.local domain.
Djoin /provision /domain mcsalab.local /machine client1 /savefile c:\ODJ_File.txt
- After creating the file, copy the file to the client (CLIENT1 )and execute the following command syntax
djoin /requestODJ /loadfile <file name> /windowspath <path of wwindows directory>
- To join a Windows system, using the previously created ODJ file, execute the following command on CLIENT1.
djoin /requestODJ /loadfile C:\ODJ_File.txt /windowspath %systemroot% /localos
- Reboot the system and your client will be added to the domain.
In this post, we have explained how to join a Windows machine to a domain using the Offline Domain Join process. If you have something to add or suggest, you’re welcome.