Today, in this mini-post, I want to show you how to perform an offline domain join. During this process, a computer is configured to join a domain without network access to the active directory.

The offline domain join procedure requires you to run the djoin.exe command twice, once on a computer with access to a domain controller, and then again on the computer to be joined.

Requirements

You can run Djoin.exe only on computers that run Windows 7, Windows Server 2008 R2 or newer.

You must have the rights that are necessary to join workstations to the domain.

Provision a computer account in a domain

1. On a domain controller, open an elevated command prompt, and then type:

djoin.exe /Provision /Domain <DomainName> /Machine <MachineName> /SaveFile <filepath> 1 2 3 djoin.exe / Provision / Domain < DomainName > / Machine < MachineName > / SaveFile < filepath >

2. Copy the generated file to the target computer.

Request an offline domain join

3. On the target computer, open an elevated command prompt, and then type:

Djoin.exe /requestodj /loadfile <filepath> /windowspath %systemroot% /localos 1 2 3 Djoin.exe / requestodj / loadfile < filepath > / windowspath %systemroot% / localos

4. Restart the target computer.

shutdown /r /t 0 1 2 3 shutdown / r / t 0

Once the machine has been restarted. You will see that the computer is now a member of your domain.

If you want to know more about the Djoin command line utility, check out this link: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/ff793312(v%3Dws.11)

Was this article useful? Support my work!