启用 S 模式

本主题演示如何将 S 模式添加到受支持的 Windows 桌面版本。 以下信息仅适用于 Windows 10 版本 1803 或更高版本。

概述

从 Windows 10 版本 1803 开始,可在受支持的版本上启用 S 模式。 这是与早期版本的 Windows 相比进行的更改,在早期版本中,Windows 10 S 是其自己的带有基础媒体的版本。 若要启用 S 模式,需要创建一个 unattend 文件,然后使用 DISM 将 unattend 文件应用于装载的 Windows 映像。

建议同时启用 S 模式并添加制造密钥。 我们将在 S 模式部署实验室以及 Windows 桌面版本的 OEM 部署实验室中演示如何执行此操作。

启用 S 模式

若要在 Windows 映像中启用 S 模式,请使用包含“阶段 2 - offlineServicing”中某项设置的 Unattend 文件,并使用 DISM 将其应用于装载的 Windows 映像。

  1. 装载 Windows 映像。

  2. 使用 Windows SIM 创建或修改 unattend 文件。

  3. amd64_Microsoft_Windows_CodeIntegrity 组件添加到“阶段 2 - offlineServicing”。

  4. 将 amd64_Microsoft_Windows_CodeIntegrity\SkuPolicyRequired 设置为 1。 unattend.xml 文件中的脱机维护阶段应如下所示:

    <settings pass="offlineServicing">
    <component name="Microsoft-Windows-CodeIntegrity" 
                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">
        <SkuPolicyRequired>1</SkuPolicyRequired>
    </component>
    </settings>
    
  5. 将答案文件作为 unattend.xml 保存在已装载的映像的 Windows\Panther 文件夹中。

  6. 使用 DISM 应用 unattend 文件并启用 S 模式:

    dism /image:C:\mount\windows /apply-unattend:C:\mount\windows\windows\panther\unattend.xml
    

    注意

    仅当使用 DISM 应用了 unattend 文件时,才会处理“阶段 2 - offlineServicing”。

S 模式现在会应用于 Windows 映像。 当电脑启动时,将在 Windows 安装上强制执行代码完整性策略。 如果要将电脑启动到审核模式,则必须启用生产模式。 启用生产模式描述如何执行此操作。