How To Add Nano Server to a Domain? #NanoServer #WS2016

| ,

Published on | Updated on December 30, 2020

2 Min. Read

Introduction

In the previous post, I showed you how to install Windows Nano Server on HPE ProLiant Gen9 servers.

When creating a Nano Server image in Windows PowerShell or using the new graphical user interface Nano Server image builder, we have the option to add Nano instance to an existing domain. But this requires to have a domain controller accessible during the image creation and your management machine must be a member of the same domain. In some scenarios, this is not a viable option to us.

The question is, can I add a Nano Server to a domain after has been deployed?

The answer is YES!

In this post, I will show you how to add a Nano server to an existing domain.

Requirements

The requirements are very simple, you need to have another machine Windows 10 or Server 2016 that is already joined to the same domain that Nano server will be part of.

Add Nano Server to a domain

Switch to the management machine and open Windows PowerShell as Administrator.

At the PowerShell prompt, type the following cmdlet, and then press Enter. Your domain and server name might be different.

djoin.exe /provision /domain virt /machine NANOSRV-HV04 /savefile .\odjblob

HowTo-NanoDomain-02

At the PowerShell prompt, type the following cmdlet, and then press Enter. Your Nano IP address might be different. Type Y, and when prompted press Enter.

Set-Item WSMan:\localhost\Client\TrustedHosts "172.16.20.174"

At the PowerShell prompt, type the following cmdlet, and then press Enter.

$IP = "172.16.20.174"
$Session = New-PSSession -ComputerName $ip -Credential $ip\Administrator

In the Windows PowerShell credential request dialog box, in the Password box, type the administrator password that you used when deploying Nano Server and then click OK.

At the PowerShell prompt, type the following cmdlet, and then press Enter.

Copy-Item -ToSession $Session -Path 'C:\odjblob' -Destination C:\ -Recurse –Verbose

This command will copy the odjblob file from the management machine to Nano server over PowerShell remote session.

At the PowerShell prompt, type the following cmdlet, and then press Enter.

$Session | Enter-PSSession
djoin /requestodj /loadfile c:\odjblob /windowspath c:\windows /localos
shutdown /r /t 5

HowTo-NanoDomain-04

Verifying Nano Server domain joined

Switch to Nano server and in the User name box, type Administrator, and then press the Tab key.
In the Password box, type the domain password In the Domain box, type the domain name, and then press Enter.
In the Nano Server Recovery Console, observe that the computer is now joined to the domain.

HowTo-NanoDomain-05

Cheers,
[email protected]

Previous

Passed 70-743 Exam: Upgrading Your Skills to Windows Server 2016 #WS2016 #MCSA

How to Expand and Resize Storage Spaces Direct CSV Volume? #WS2016 #HyperV #S2D

Next

Leave a comment below...

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Subscribe to Charbel Nemnom’s Blog

Get the latest posts delivered right to your inbox

The content of this website is copyrighted from being plagiarized! However, you can copy from the 'Code Blocks'.

Please send your feedback to the author using this form for any 'Code' you like.

Thank you for visiting!