In this article, I am going to show you how to Join your Nano Server to the domain. We can only join your Nano Server to the domain once it has an IP address and DNS set up. You can view how to do that here.
Now we have our Nano server all setup with IP and DNS we are ready to Join it to the domain.
You are unable to join Nano Server to a domain directly and will need to do it in two parts using djoin.
Create domain-join blob
Connect to a Server or computer that is already joined to the domain. (Windows 7, Windows Server 2008 R2, and later OSes)
Open PowerShell with elevated credentials and run the following cmdlet.
1 2 |
New-Item -ItemType directory -Path c:\domjoin djoin.exe /provision /domain pixelrobots.co.uk /machine PIXEL-NANO01 /savefile c:\domjoin\odjblob |
Copy blob file to Nano Server
We need to get the blob file on to the Nano server ready for the Domain Join. You will need WMF 5.0 for this. Or just use a 2016 Server.
1 2 |
$nano = New-PSSession -ComputerName 192.168.2.17 -Credential Administrator Copy-Item -Path C:\domjoin\odjblob -Destination C:\ -ToSession $nano |
Connect to Nano Server
Using the same PowerShell window connect to your Nano Server using PowerShell Remoting.
See my guide on managing Nano Servers to make sure you have added your Nano Server to the Trusted Hosts List.
In the same Powershell window as before.
1 |
Enter-PSSession $nano |
Join Nano Server to the Domain
Now we need to use the following cmdlet to join the Nano server to the domain using our blob file.
1 2 3 |
djoin /requestodj /loadfile c:\odjblob /windowspath c:\windows /localos shutdown /r /t 10 Exit-PSSession |
And that’s it you now have your Nano Server on the domain.
You can check by logging into your Nano Server via the Recovery Console with your domain credentials.
0 Comments