UserAccountsUserAccounts

UserAccounts 指定要创建的本地帐户、要添加的域帐户以及管理员密码。UserAccounts specifies local accounts to be created, domain accounts to be added, and the administrator password.

子元素Child Elements

设置Setting 说明Description
AdministratorPasswordAdministratorPassword 指定计算机的管理员密码,以及它是否隐藏在无人参与安装答案文件中。Specifies the administrator password for the computer and whether it is hidden in the unattended installation answer file.
DomainAccountsDomainAccounts 指定在安装过程中要添加到计算机上的本地安全组的域帐户的详细信息。Specifies the details of domain accounts to be added to local security groups on the computer during installation.
LocalAccountsLocalAccounts 指定要在安装过程中创建的本地帐户的详细信息。Specifies the details of local accounts to be created during installation.

有效的配置阶段Valid Configuration Passes

auditSystemauditSystem

oobeSystemoobeSystem

父层次结构Parent Hierarchy

Microsoft-Shell-安装程序 | UserAccountsMicrosoft-Windows-Shell-Setup | UserAccounts

应用于Applies To

有关此组件支持的 Windows 版本和体系结构的列表,请参阅 Microsoft-Windows Shell 设置For a list of the supported Windows editions and architectures that this component supports, see Microsoft-Windows-Shell-Setup.

XML 示例XML Example

下面的 XML 输出演示如何设置 UserAccountsThe following XML output shows how to set UserAccounts.

<UserAccounts>
   <AdministratorPassword>
      <Value>cAB3AEEAZABtAGkAbgBpAHMAdAByAGEAdABvAHIAUABhAHMAcwB3AG8AcgBkAA==</Value>
      <PlainText>false</PlainText>
   </AdministratorPassword>
   <DomainAccounts>
      <DomainAccountList wcm:action="add">
         <DomainAccount wcm:action="add">
            <Name>account1</Name>
            <Group>Fabrikam\Group1</Group>
         </DomainAccount>
         <DomainAccount wcm:action="add">
            <Name>account2</Name>
            <Group>Fabrikam\Group2</Group>
         </DomainAccount wcm:action="add">
         <Domain>domain1</Domain>
      </DomainAccountList>
      <DomainAccountList wcm:action="add">
         <DomainAccount wcm:action="add">
            <Name>account3</Name>
            <Group>Fabrikam\Group2</Group>
         </DomainAccount wcm:action="add">
         <Domain>domain2</Domain>
     </DomainAccountList>
   </DomainAccounts>
   <LocalAccounts>
      <LocalAccount wcm:action="add">
         <Password>
            <Value>cAB3AFAAYQBzAHMAdwBvAHIAZAA</Value>
            <PlainText>false</PlainText>
         </Password>
         <Description>Test account</Description>
         <DisplayName>Admin/Power User Account</DisplayName>
         <Group>Administrators;Power Users</Group>
         <Name>Test1</Name>
      </LocalAccount>
      <LocalAccount wcm:action="add">
         <Password>
            <Value>cABhAHMAcwB3AG8AcgBkAFAAYQBzAHMAdwBvAHIAZAA=</Value>
            <PlainText>false</PlainText>
         </Password>
         <Description>For testing</Description>
         <DisplayName>Admin Account</DisplayName>
         <Group>Administrators</Group>
         <Name>Test2</Name>
      </LocalAccount>
   </LocalAccounts>
</UserAccounts>

Microsoft-Shell-安装程序 自动执行 OOBEMicrosoft-Windows-Shell-Setup Automate OOBE