官术网_书友最值得收藏!

Domain join

You can also join Nano Server to a domain using the djoin.exe command line.

We have two ways of doing that:

  • The first option is a blob-based domain join. It means that you should generate a blob from a domain joined machine located in the same domain, and then copy that blob over to Nano Server. Then, apply that blob to the image in offline or online mode.
    • To harvest a data blob from a domain machine that is already running Windows Server 2016, from an elevated command prompt, run the following command:
djoin.exe /provision /domain <domain-name> /machine <machine-name> /savefile .\odjblob 
  • Next, we need to copy that harvest data blob <odjblob> into the Nano Server machine using PowerShell remoting, and then join it to the domain by running the following command:
$Session = New-PSSession -ComputerName <NanoServer> -Credential ~\Administrator

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

$Session | Enter-PSSession
djoin /requestodj /loadfile C:\odjblob /windowspath c:\windows /localos
shutdown /r /t 5
Exit-PSSession
  • The second option is to generate a blob on a machine that is joined to the same domain as well, and then open that blob file <odjblob> that you generated and copy its content inside the unattend.xml file under the <AccountData> section, as shown in Figure 13. Then, use that unattend.xml file to apply the domain join on boot in the Nano Server image.
    • To harvest a data blob from a domain machine that is already running Windows Server 2016, we need to use the same step as described previously with djoin.exe command:
Figure 13: Nano Server domain join, unattend.xml
  • Add the contents of the odjblob file to the unattend.xml file
  • Inject the unattend.xml file into the Nano Server image as discussed earlier
I f you have multiple Nano Servers that you want to join to the domain, you should generate one blob for each Nano machine, because the blob has computer name information. If you specify a blob using the unattend.xml file as shown in Figure 13, you cannot specify a computer name in the unattend.xml file as well. This will contradict, as the blob already holds the computer name when you are generating it from the djoin.exe .
主站蜘蛛池模板: 繁昌县| 宁城县| 遵义市| 双桥区| 永靖县| 九江市| 桓台县| 拜城县| 巴楚县| 石棉县| 咸阳市| 新河县| 沿河| 乌恰县| 土默特左旗| 岑巩县| 阿巴嘎旗| 五台县| 青铜峡市| 财经| 资兴市| 革吉县| 江华| 定安县| 平顺县| 肥城市| 睢宁县| 辽源市| 台南县| 永胜县| 景德镇市| 舟曲县| 无锡市| 长治市| 乌拉特中旗| 延吉市| 永寿县| 南岸区| 新营市| 临汾市| 高州市|