Sometimes it is necessary to perform an Offline Domain join of a computer. This is usually for a remote computer with no immediate access to the domain network. You can use DJOIN to perform and offline domain join and force the machine to apply group policies that would normally be applied whilst connected to the network.
First you need to prepare the offline domain join request by logging on to a domain joined machine and opening command prompt. We create the request by stating the computername to join and any policy names (GPOs) you want to apply immediately.
Example Direct Access
On the windows joined machine enter the following command to prepare the offline domain join
djoin.exe /provision /domain <domain.local> /machine <machinenametojoin> /savefile c:\<machinename>.txt /POLICYNAMES "Direct Access Settings, User Restrictions GPO"
The Policy names are the names of the GPOs you want to apply. Copy the file it created to the root of C:\ on the remote workstation
Open command prompt on the remote workstation and issue this command
djoin.exe /requestODJ /loadfile: c:\<machinename>.txt /windowspath %systemroot% /localos
Restart the machine and it will be domain joined with policies applied
Mark is an Independent Microsoft Teams Consultant with over 15 years experience in Microsoft Technology. Mark is the founder of Commsverse, a dedicated Microsoft Teams conference and former MVP. You can follow him on twitter @UnifiedVale