====== 制作Windows 10系统的dd包 - 含网卡和设置静态IP ====== 环境:drserver.net 超微主板的凌动服务器($20.00);Windows 10安装ISO文件;Dism++;7-zip;网卡驱动文件;DeployVHD 思路: 1.下载好Windows 10安装ISO文件,如 cn_windows_10_business_edition_version_1803_updated_jul_2018_x64_dvd_12613133.iso 2.按“蜂鸣器”博客里提到的方法,通过Dism++制作好包含“intel ethernet connection 1354 2.5 gbe backplane”网卡驱动的映像文件,将映像文件释放到vhd {{https://alioss.anqun.org/typecho/2018/08/08/130821838014586.png}} 3.通过DeployVHD,应用无人值守配置文件Unattend.xml,启用远程桌面,且允许通过Windows防火墙,设置管理员administrator的密码,设置自动登录,设置“以太网”的网卡静态IP。如果是设置为中文语言的,需要留意/Windows/panther/Unattend.xml的文件内容,因为汉字的网卡名称可能会保存异常,否则可能在安装时会提示无人值守文件检查失败 {{https://alioss.anqun.org/typecho/2018/08/08/130832460382376.png}} 4.压缩包含有无人值守安装设置的vhd文件。在机子上安装测试,通过 {{https://alioss.anqun.org/typecho/2018/08/08/130823161189870.png}} /Windows/panther/Unattend.xml 文件内容: false 0 @FirewallAPI.dll,-28752 all true 007f:00000804 zh-CN zh-CN zh-CN zh-CN xinNIANhao2019 true</PlainText> </Password> <Enabled>true</Enabled> <LogonCount>5</LogonCount> <Username>Administrator</Username> </AutoLogon> <FirstLogonCommands> <SynchronousCommand wcm:action="add"> <CommandLine>powershell.exe Get-NetAdapter -Name * | ? status -eq up | Rename-NetAdapter -NewName "iEtherNet"</CommandLine> <Description>rename nic name</Description> <Order>1</Order> </SynchronousCommand> <SynchronousCommand wcm:action="add"> <CommandLine>powershell.exe New-NetIPAddress -IPAddress "144.172.126.32" -InterfaceAlias "iEtherNet" -PrefixLength 24 -DefaultGateway 144.172.126.1</CommandLine> <Description>set static ip address</Description> <Order>2</Order> </SynchronousCommand> <SynchronousCommand wcm:action="add"> <CommandLine>powershell.exe Set-DnsClientServerAddress -InterfaceAlias "iEtherNet" -ServerAddresses 8.8.8.8</CommandLine> <Description>set dns server</Description> <Order>3</Order> </SynchronousCommand> </FirstLogonCommands> <UserAccounts> <AdministratorPassword> <Value>xinNIANhao2019</Value> <PlainText>true</PlainText> </AdministratorPassword> </UserAccounts> <OOBE> <HideEULAPage>true</HideEULAPage> <SkipMachineOOBE>true</SkipMachineOOBE> </OOBE> <TimeZone>China Standard Time</TimeZone> </component> </settings> <cpi:offlineImage cpi:source="catalog:d:/temp/install_windows server 2012 r2 serverdatacenter.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> </unattend> </file> 参考: * https://www.fmqcloud.com/archives/makedd.html * https://askubuntu.com/questions/145902/unable-to-mount-windows-ntfs-filesystem-due-to-hibernation * https://github.com/wellsluo/DeployVHD/blob/master/README-CN.md * https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-shell-setup-firstlogoncommands * https://docs.microsoft.com/en-us/powershell/module/nettcpip/new-netipaddress?view=win10-ps * https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-tcpip-interfaces-interface-unicastipaddresses-ipaddress * https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/networking-mpssvc-svc-firewallgroups-firewallgroup * https://github.com/cloudbase/unattended-setup-scripts/blob/master/Autounattend.xml * https://www.starwindsoftware.com/blog/specialize-windows-server-hyper-v-guest-os-automatically * https://blogs.technet.microsoft.com/heyscriptingguy/2012/09/06/use-powershell-3-0-to-rename-network-adapters/ * https://blogs.technet.microsoft.com/heyscriptingguy/2012/11/21/use-powershell-to-configure-the-nic-on-windows-server-2012/