我正在尝试让我的 WinPE 环境重命名,我目前有一个 WinPE .wim,用于通过 WDS 服务器进行部署,它配置磁盘并将相同的 WinPE 环境部署到其中一个分区中并使其可启动。但是,我需要将磁盘上不可启动的 WinPEs 主机名从随机计算机名称“MININT-******”更改为我需要的名称。
我尝试了 unattend.xml 并运行 wpeinit.exe /unattend:[path to unattend.xml]
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ComputerName>ASDF1234</ComputerName>
</component>
</settings>
</unattend>
我尝试了许多 unattend.xml 的变体,wpeinit 日志文件中的每个变体都说
WPEINIT is processing the unattend file [Path]
==== Initializing Display Settings ====
No display settings specified
STATUS: SUCCESS (0x0000001)
==== Initializing Computer Name ====
Generating a random computer name
No computer name specified, generating a random name.
Renaming computer to MININT-*******.
Waiting on the profiling mutex handle
Acquired profiling mutex
Service winmgmt disable: 0x0000000
...
除了重命名系统之外,此时一切正常,当使用带有 powershell 的 Rename-Computer 时它可以工作,但是一旦它重新启动,它就会再次运行 wpeinit,这似乎会生成一个随机名称。
任何帮助将非常感激!