我的 unattend.xml 就在这里:
它创建了管理员帐户,并设置了密码,但由于某种原因,它没有将其放入组管理员中,尽管在用户管理员上方显示为组管理员。
有人知道哪里错了吗
答案1
最佳解决方案是使用 BuildIn 管理员帐户。诀窍是在设置时启用它们。但在我的示例中,我还创建了 2. 管理员帐户。
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="specialize">
<component name="Microsoft-Windows-Deployment" 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">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Order>1</Order>
<Path>net user administrator /active:yes</Path>
<Description>Activate Buildin Administrator</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
<settings pass="oobeSystem">
<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">
<UserAccounts>
<AdministratorPassword>
<Value>XXXX</Value>
<PlainText>false</PlainText>
</AdministratorPassword>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<Value>XXXX</Value>
<PlainText>false</PlainText>
</Password>
<Description>local Admin Account</Description>
<DisplayName>Maintainer</DisplayName>
<Group>Administrators</Group>
<Name>Maintainer</Name>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
</component>
</settings>
</unattend>