Have a computer you need to add to a domain that cannot access your domain? No problem, you?can?use djoin to add the computer without needing access. Djoin /provision can provision the account in your computers OU and will create a text file you copy to said computer to join.
1. On a computer connect to the domain, and this can be any computer with domain access run the command below from an elevated command prompt. (to get an elevated command prompt either right click on cmd and click run as administrator or press CTRL + Shift and open CMD.)
2. Type the following command at the prompt.
djoin /provision /domain DOMAINNAME /machine COMPUTERNAME /savefile SAVEFILEPATH.txt
IE:?djoin /provision /domain FAMLAN /machine WIN702 /savefile c:\win702-djoin.txt
3. Copy/Transfer the file that was created to the machine that needs to be added to the domain.
4. On the computer that needs to be added run the following command from an elevated command prompt.
djoin /requestODJ /loadfile PATHTOTEXTFILE /windowspath %systemroot% /localos
IE:?djoin /requestODJ /loadfile C:\win702-djoin.txt /windowspath %systemroot% /localos
5. Now reboot the computer (from cmd prompt type: “shutdown /t 1 /f /r” without the “”) and it will be joined to the domain. Login with a domain user account and you’re ready to go.