Using offline domain joining makes adding computers to a domain offsite much easier. You need to run Djoin.exe at an elevated command prompt to provision the computer account metadata. When you run the provisioning command, the computer account metadata is created in a binary file that you specify as part of the command.
In summary, the process is as follows. In a Domain Controller, we run the appropriate djoin /provision command which produces an encoded txt file. We copy the file to the computer or server we are about to join into the domain and run the appropriate djoin /requestODJ command. After restarting, the offline domain join process will be completed.
Next run the below line of code on the computer that you want to add to a domain offline:
We often use a comma-delimited (CSV) text file to create two users with the Import-Csv and New-ADUser cmdlets. We do this by splitting the first field of each entry in the text file so that we separate the first and surnames for the -GiveName and -Surname parameters of the New-ADUser cmdlet.
The first line of the .csv text file contains the field names then you can add as many users as you want.