djoin

Unattended Setup Generic Command For Domain Join

Unattended Setup Generic Command For Domain Join


djoin

  • C:\Windows\system32\djoin.exe /?

Output:

Usage: djoin.exe [/OPTIONS]

  /PROVISION  - Provision a computer account in the domain
      /DOMAIN <Name> - <Name> of the domain to join
      /MACHINE <Name> - Host <Name> of the computer joining the domain
      /MACHINEOU <OU> - Optional <OU> where the account is created
      /DCNAME <DC> - Optional <DC> to target for account creation
      /REUSE - Reuse any existing account (password will be reset)
      /SAVEFILE <FilePath> - Save provisioning data to a file at <FilePath>
      /NOSEARCH - Skip account conflict detection, requires DCNAME (faster)
      /DOWNLEVEL - Support using a Windows Server 2008 DC or earlier
      /PRINTBLOB - Return base64 encoded metadata blob for an answer file
      /DEFPWD - Use default machine account password (not recommended)
      /ROOTCACERTS - Opt. include root Certificate Authority certificates.
      /CERTTEMPLATE <Name> - Optional <Name> of machine certificate template.
                             Includes root Certificate Authority certificates.
      /POLICYNAMES <Name(s)> - Opt. semicolon-separated list of policy names.
                               Each name is the displayName of the GPO in AD.
      /POLICYPATHS <Path(s)> - Opt. semicolon-separated list of policy paths.
                               Each path is a path to a registry policy file.
      /NETBIOS <Name> - Opt. Netbios <Name> of the computer joining the domain.
      /PSITE <Name> - Opt. <Name> of persistent site to put the computer joining
                      the domain in.
      /DSITE <Name> - Opt. <Name> of dynamic site to initially put the computer
                      joining the domain in.
      /PRIMARYDNS <Name> - Opt. <Name> of primary DNS domain of the computer
                           joining the domain.

  /REQUESTODJ  - Request offline domain join at next boot
      /LOADFILE <FilePath> - <FilePath> specified previously via /SAVEFILE
      /WINDOWSPATH <Path> - <Path> to the Windows directory in an offline image
      /LOCALOS - Allows /WINDOWSPATH to specify the locally running OS.
                 This command must be run as a local Administrator.
                 This option requires a reboot for changes to be applied.
     
Examples:

To provision a computer account in the domain:
djoin.exe /PROVISION /DOMAIN <DomainName> /MACHINE <MachineName>
          /SAVEFILE <FilePath>
          Note: Other parameters are optional
         
To request the local machine to perform an offline domain join:
djoin.exe /REQUESTODJ /LOADFILE <FilePath> /WINDOWSPATH <Path>
          Note: Other parameters are optional

Return Code: 0


C:\Windows\system32\djoin.exe
c:\>ver
Microsoft Windows [Version 10.0.19045.2075]
FileInfo
File Size75776bytes
Creation Time2022/07/08 08:48:13
LastWrite Time2022/07/08 08:48:13
ProductVersion10.0.19041.1
FileVersion10.0.19041.1 (WinBuild.160101.0800)
HashValue
MD5ff5c38dd0921a67df289f72f8f761e51
SHA179d617858b62db80f0694dadcff037cd82e20b68
SHA224d8f8d0d9eaa22d612f5d8960af3be619e3cdc5f9b8a0853276c5183f
SHA256ca5d6bf4976215adefbe7c94132eeb123fd5724a508896f1f9a557eecdefe505
SHA3849cbda9f1c6d2c11560140721f2ac382a51e6c26fa3cd2f09a9a6a15d9fe858d5839caf4d245a71f05dc70b61fcaf0ad6
SHA51255bd548b29fd1513523bdb1922cd222e6c58621935bcb26e7bc286ecffc504cba0e9f2def96013c4e29e0da569c072375c12700faa44c4f795054bc8bb93d5b9
Built with Hugo
Theme Stack designed by Jimmy