Загрузка данных


C:\Windows\System32\Sysprep\sysprep.exe /oobe /generalize /shutdown /unattend:C:\Windows\System32\Sysprep\unattend.xml
metadata_services=cloudbaseinit.metadata.services.configdrive.ConfigDriveService
unattend.xml

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">

  <!-- ========================= -->
  <!-- SPECIALIZE                -->
  <!-- ========================= -->
  <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">

      <!-- Cloudbase-Init потом сможет изменить hostname -->
      <ComputerName>*</ComputerName>

      <TimeZone>UTC</TimeZone>

    </component>

    <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>

        <!-- Гарантированно включаем нашего Admin -->
        <RunSynchronousCommand wcm:action="add">
          <Order>1</Order>
          <Description>Enable Admin account</Description>
          <Path>cmd.exe /c net user Admin /active:yes</Path>
        </RunSynchronousCommand>

        <!-- Пароль Admin не должен истекать -->
        <RunSynchronousCommand wcm:action="add">
          <Order>2</Order>
          <Description>Disable password expiration for Admin</Description>
          <Path>powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "Set-LocalUser -Name 'Admin' -PasswordNeverExpires $true"</Path>
        </RunSynchronousCommand>

      </RunSynchronous>

    </component>

  </settings>


  <!-- ========================= -->
  <!-- OOBE SYSTEM               -->
  <!-- ========================= -->
  <settings pass="oobeSystem">

    <component name="Microsoft-Windows-International-Core"
               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">

      <InputLocale>en-US</InputLocale>
      <SystemLocale>en-US</SystemLocale>
      <UILanguage>en-US</UILanguage>
      <UserLocale>en-US</UserLocale>

    </component>


    <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">

      <OOBE>

        <!-- Лицензия -->
        <HideEULAPage>true</HideEULAPage>

        <!-- Не показывать создание локальной учётки -->
        <HideLocalAccountScreen>true</HideLocalAccountScreen>

        <!-- Не предлагать Microsoft Account -->
        <HideOnlineAccountScreens>true</HideOnlineAccountScreens>

        <!-- Не показывать OEM-регистрацию -->
        <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>

        <!-- Не показывать настройку Wi-Fi -->
        <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>

        <!-- Не показывать сетевой экран -->
        <NetworkLocation>Work</NetworkLocation>

        <!-- Не предлагать Express Settings -->
        <ProtectYourPC>3</ProtectYourPC>

        <!-- Полностью пропустить machine OOBE -->
        <SkipMachineOOBE>true</SkipMachineOOBE>

        <!-- Полностью пропустить user OOBE -->
        <SkipUserOOBE>true</SkipUserOOBE>

      </OOBE>

    </component>

  </settings>

</unattend>