書名: Getting Started with Nano Server作者名: Charbel Nemnom本章字數: 163字更新時間: 2021-07-02 21:11:09
Customizing a Nano image using unattend.xml file
To customize Nano Server using DISM so you can manage it remotely, you need to set an administrator password.
The simplest way is using an unattend.xml file, as shown in the following example:
<?xml version='1.0' encoding='utf-8'?>
<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<settings pass="offlineServicing">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<ComputerName>NanoServer01</ComputerName>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<UserAccounts>
<AdministratorPassword>
<Value>Passw0rd!</Value>
<PlainText>true</PlainText>
</AdministratorPassword>
</UserAccounts>
<TimeZone>Romance Standard Time</TimeZone>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<RegisteredOwner>My Team</RegisteredOwner>
<RegisteredOrganization>My Corporation</RegisteredOrganization>
</component>
</settings>
</unattend>
In this sample, the unattend.xml file does not add the Nano Server to a domain. Therefore, you should use it if you want to run the Nano Server as a standalone machine or if you want to wait and join it later to a domain. The values for ComputerName and AdministratorPassword are merely examples.
Please note that by using unattend.xml you can also include domain join information. We will get into that in a bit.
The unattend.xml file must be placed under the C:\Windows\panther folder in the Nano Server image.
You can download a sample of unattend.xml file for standalone and domain joined as a companion to this book.
推薦閱讀
- LabVIEW Graphical Programming Cookbook
- Android開發精要
- Django:Web Development with Python
- 新手學Visual C# 2008程序設計
- Learning Laravel 4 Application Development
- Mastering ServiceNow(Second Edition)
- Oracle從入門到精通(第5版)
- Kotlin開發教程(全2冊)
- OpenCV 3 Blueprints
- Learning Bootstrap 4(Second Edition)
- 零基礎學C++(升級版)
- Analytics for the Internet of Things(IoT)
- 利用Python駕馭Stable Diffusion:原理解析、擴展開發與高級應用(智能系統與技術叢書)
- 精通Oracle 12c 數據庫管理
- Boost.Asio C++ Network Programming Cookbook