In previous article, we have configured a Windows Server 2016 Nano. In this post, we will extend the same topic and I’ll show you to join the nano server with an existing domain.

Joining a Nano Server with Domain

1. Run the following command on any domain controller.  This will create a computer account (in an active directory) and the file you specify in the command. That file contains domain information. 

Djoin.exe /provision /domain <FQDN Of domain> /machine <DNS name of nano server> /savefile .\<File Name>

Open Active Directory Users and Computers console. Expand domain name, click Computers and verify the existence of computer account you just created in above step. 

 

 

Go to the drive where your operating system is installed (which is normally used to be C drive). Double-click Users and then your user name. Verify the existence of file you just created.

2. Copy/paste the file (you created in above step) to C drive of nano server with the help of file explorer (type \\<ip address of nano of server>\c$ as shown in the following figure).

 

3. Execute the following command to add an IP address of nano server to the list of trusted hosts.

Set-Item WSMan:\localhost\Client\TrustedHosts -Value <IP address of nano server> 

 

4. Execute the following command to create a PowerShell session with nano server.

Enter-PSSession -ComputerName <computername or IP address> -Credential <IP address of nano server>\Administrator

5. Execute the following command to join the nano server with domain. 

Djoin.exe /requestodj /loadfile c:\<filename> /windowspath c:\windows /localos

‚Äč

6. You are done. Reboot the nano server so that changes can take effect.

 

Once you login, you will notice the domain name on nano server recovery console.