How to configure offline Domain Join (djoin command)
In this post, we’ll learn the steps to configure offline domain join using djoin command in Windows Server 2012 R2. It can be used to add a Server or workstation in a domain even if we don’t have network connectivity between them. In the old post, we have already learned the steps to create Domain Controller and create additional domain controller.
Why do we need Offline Domain Join (djoin command)?
Offline Domain Join is required in a scenario in which either organization is facing an issue with network between the Domain Controller and the remote site or bulk domain Join is required. To configure offline domain join we need to run a command on the Domain Controllers and it would create a text file. We need to copy the text file to the Server or Workstation that we need to add in the Domain.
Steps to configure offline Domain Join using DJoin command
We need two servers for this scenario. First is the Domain Controller i.e. DC01 and another is a member server i.e. DC04. (Steps to promote Domain Controller using PowerShell)
On the Domain Controller i.e. DC01 we can see two computer accounts created i.e. DC02 and DC03. As of now we only have these two Servers in our Domain.
In this practical, we’ll add DC04 to itingredients.com domain, currently this server is part of Workgroup.
To configure offline Domain Join for DC04, go to Domain Controller i.e. DC01 and run the following Command.
DJoin /Provision /Domain itingredients.com /Machine DC04 /SaveFile C:\DC04.txt
This command would provision new computer account named as DC04 in default Computers OU in domain itingredients.com. Provisioning data would be encrypted and saved in the file c:\DC04.txt.
This information will be encrypted and saved in DC04.txt file.
Once the command is completed successfully move the file C:\DC04.txt to DC04 Server. We have moved the file to C: drive of DC04.
On DC04 run the following command.
DJoin /RequestODJ /LoadFile C:\DC04.txt /WindowsPath %windir% /LocalOS
This command would load the provisioning data from the file and perform offline domain join.
Please ensure that you reboot the Server for changes to be applied.
After reboot is completed, we tried to login with the domain user and it worked successfully.
Moreover we checked the system settings and it shows that DC04 is successfully joined domain itingredients.com.
Hope you understood the steps to configure offline Domain join using djoin. Please feel free to leave your comments and suggestions in the comment section.