Server Core 应用兼容性按需功能 (FOD)Server Core App Compatibility Feature on Demand (FOD)

适用于:Windows Server 2019、Windows Server 半年频道Applies to: Windows Server 2019, Windows Server Semi-Annual Channel

Server Core 应用兼容性按需功能是一个可选的功能包,随时可将其添加到 Windows Server 2019 Server Core 安装或 Windows Server 半年频道。The Server Core App Compatibility Feature on Demand is an optional feature package that can be added to Windows Server 2019 Server Core installations, or Windows Server Semi-Annual Channel, at any time.

有关按需功能 (FOD) 的详细信息,请参阅按需功能For more information on Features on Demand (FOD), see Features On Demand.

为何要安装应用兼容性 FOD?Why install the App Compatibility FOD?

应用兼容性是适用于 Server Core 的一项按需功能,包含带桌面体验的 Windows Server 的一部分二进制文件和包,无需添加 Windows Server 桌面体验图形环境,因此显著提高了 Windows Server Core 安装选项的应用兼容性。App Compatibility, a Feature on Demand for Server Core, significantly improves the app compatibility of the Windows Server Core installation option by including a subset of binaries and packages from Windows Server with Desktop Experience, without adding the Windows Server Desktop Experience graphical environment. 此可选包在单独的 ISO 中提供,或者通过 Windows 更新提供,但只能添加到 Windows Server Core 安装和映像。This optional package is available on a separate ISO, or from Windows Update, but can only be added to Windows Server Core installations and images.

应用兼容性 FOD 提供的两项主要价值为:The two primary values the App Compatibility FOD provides are:

  • 提高已面市的或者已由组织开发并部署的服务器应用程序的 Server Core 兼容性。Increases the compatibility of Server Core for server applications that are already in market or have already been developed by organizations and deployed.
  • 帮助提供 OS 组件,并提高重要故障排除和调试方案中使用的软件工具的应用兼容性。Assists with providing OS components and increased app compatibility of software tools used in acute troubleshooting and debugging scenarios.

作为 Server Core 应用兼容性 FOD 一部分提供的操作系统组件包括:Operating system components that are available as part of the Server Core App Compatibility FOD include:

  • Microsoft 管理控制台 (mmc.exe)Microsoft Management Console (mmc.exe)

  • 事件查看器 (Eventvwr.msc)Event Viewer (Eventvwr.msc)

  • 性能监视器 (PerfMon.exe)Performance Monitor (PerfMon.exe)

  • 资源监视器 (Resmon.exe)Resource Monitor (Resmon.exe)

  • 设备管理器 (Devmgmt.msc)Device Manager (Devmgmt.msc)

  • 文件资源管理器 (Explorer.exe)File Explorer (Explorer.exe)

  • Windows PowerShell (Powershell_ISE.exe)Windows PowerShell (Powershell_ISE.exe)

  • 磁盘管理 (Diskmgmt.msc)Disk Management (Diskmgmt.msc)

  • 故障转移群集管理器 (CluAdmin.msc)Failover Cluster Manager (CluAdmin.msc)

    • 首先需要添加故障转移群集 Windows Server 功能。Requires addition of the Failover Clustering Windows Server feature first.

      • 在权限提升的 PowerShell 会话中:From an elevated PowerShell session:

        Install-WindowsFeature -NameFailover-Clustering -IncludeManagementTools
      • 若要运行故障转移群集管理器,请在命令提示符下输入 cluadminTo run Failover Cluster Manager, enter cluadmin at the command prompt.

运行 Windows Server 版本 1903 和更高版本的服务器还支持以下组件(使用相同版本的应用兼容性 FOD 时):Servers running Windows Server, version 1903 and later also support the following components (when using the same version of the App Compatibility FOD):

  • Hyper-V 管理器 (virtmgmt.msc)Hyper-V Manager (virtmgmt.msc)
  • 任务计划程序 (taskschd.msc)Task Scheduler (taskschd.msc)

安装应用兼容性 FODInstalling the App Compatibility FOD

只能在 Server Core 上安装应用兼容性 FOD。The App Compatibility FOD can only be installed on Server Core. 请勿尝试将 Server Core 应用兼容性 FOD 添加到带桌面体验的 Windows Server 安装。Don't attempt to add the Server Core App Compatibility FOD to a Windows Server installation of Windows Server with Desktop Experience. 同一 FOD 可选包 ISO 可用于 Windows Server 2019 Server Core 安装或 Windows Server 半年频道安装。The same FOD optional packages ISO can be used for either Windows Server 2019 Server Core installations, or Windows Server Semi-Annual Channel installations.

  1. 如果服务器可以连接到 Windows 更新,则只需从权限提升的 PowerShell 会话运行以下命令,然后在该命令完成运行后重启 Windows Server:If the server can connect to Windows Update, all you have to do is run the following command from an elevated PowerShell session and then restart Windows Server after the command finishes running:

    Add-WindowsCapability -Online -Name ServerCore.AppCompatibility~~~~
  2. 如果服务器无法连接到 Windows 更新,请下载服务器 FOD 可选包 ISO,然后将该 ISO 复制到本地网络上的某个共享文件夹:If the server can't connect to Windows Update, instead download the Server FOD optional packages ISO, and copy the ISO to a shared folder on your local network:

  3. 在已连接到本地网络的、要将 FOD 添加到的 Server Core 计算机上使用管理员帐户登录。Sign in with an administrator account on the Server Core computer that is connected to your local network and that you want to add the FOD to.

  4. 使用 net use 或其他某种方法连接到 FOD ISO 的位置。Use net use, or some other method, to connect to the location of the FOD ISO.

  5. 将 FOD ISO 复制到所选的本地文件夹。Copy the FOD ISO to a local folder of your choosing.

  6. 在权限提升的 PowerShell 会话中,使用以下命令装载 FOD ISO:Mount the FOD ISO by using the following command in an elevated PowerShell session:

    Mount-DiskImage -ImagePath drive_letter:\folder_where_ISO_is_saved\ISO_filename.iso
  7. 运行以下命令:Run the following command:

    Add-WindowsCapability -Online -Name ServerCore.AppCompatibility~~~~ -Source <Mounted_Server_FOD_Drive> -LimitAccess
  8. 进度条显示任务完成后,重启操作系统。After the progress bar completes, restart the operating system.

    有关 DISM 命令的详细信息,请参阅在 Windows PowerShell 中使用 DISMFor more information about DISM commands, see Use DISM in Windows PowerShell

根据需要将 Internet Explorer 11 添加到 Server Core(在添加 Server Core 应用兼容性 FOD 之后)To optionally add Internet Explorer 11 to Server Core (after adding the Server Core App Compatibility FOD)


需要使用 Server Core 应用兼容性 FOD 来添加 Internet Explorer 11,但不需要使用 Internet Explorer 11 来添加 Server Core 应用兼容性 FOD。The Server Core App Compatibility FOD is required for the addition of Internet Explorer 11, but Internet Explorer 11 is not required to add the Server Core App Compatibility FOD.

  1. 在已添加应用兼容性 FOD 并已在本地复制 Server FOD 可选包 ISO 的 Server Core 计算机上以管理员身份登录。Sign in as Administrator on the Server Core computer that has the App Compatibility FOD already added and the Server FOD optional package ISO copied locally.

  2. 在命令提示符下输入 powershell.exe 启动 PowerShell。Start PowerShell by entering powershell.exe at a command prompt.

  3. 使用以下命令装载 FOD ISO:Mount the FOD ISO by using the following command:

    Mount-DiskImage -ImagePath drive_letter:\folder_where_ISO_is_saved\ISO_filename.iso
  4. 运行以下命令,并在其中使用 $package_path 变量输入 Internet Explorer cab 文件的路径:Run the following command, using the $package_path variable to enter the path to the Internet Explorer cab file:

    $package_path = "D:\"
    Add-WindowsPackage -Online -PackagePath $package_path
  5. 进度条显示任务完成后,重启操作系统。After the progress bar completes, restart the operating system.

Server Core 应用兼容性 FOD 和 Internet Explorer 11 可选包的发行说明与建议Release notes and suggestions for the Server Core App Compatibility FOD and Internet Explorer 11 optional package


就地升级到 Windows Server 版本 1903 之后,安装在 Windows Server 版本 1809 上的 FOD 不会保留在原地,因此升级后必须重新安装它们。FODs installed on Windows Server, version 1809 won't remain in place after an in-place upgrade to Windows Server, version 1903, so you'd have to install them again after the upgrade. 或者,在升级之前可将 FOD 添加到新的 Windows Server 安装源。Alternatively, you can add FODs to the new Windows Server installation source prior to upgrading. 这可以确保在升级完成之后,提供所有 FOD 的新版本。This ensures that the new version of any FODs are present after the upgrade completes. 有关详细信息,请参阅将功能和可选包添加到脱机 WIM Server Core 映像For more info, see the Adding capabilities and optional packages to an offline WIM Server Core image.

  • 重要说明: 在继续安装和使用 Server Core 应用兼容性 FOD 与 Internet Explorer 11 可选包之前,请阅读 Windows Server 2019 发行说明了解任何问题、注意事项或指导。Important: Read the Windows Server 2019 release notes for any issues, considerations, or guidance before proceeding with installation and use of the Server Core App Compatibility FOD and Internet Explorer 11 optional package.

  • 使用 Windows 更新安装累积更新后添加应用兼容性 FOD 时,有可能会遇到 Server Core 控制台体验闪烁的问题。It's possible to encounter flickering with the Server Core console experience when adding the App Compatibility FOD after using Windows Update to install cumulative updates. 2018 年 12 月更新已解决此问题。This issue is resolved with December, 2018 updates. 有关详细信息和解决方法步骤,请参阅知识库文章 4481610:在 Windows Server 2019 Server Core 中安装 Server Core 应用兼容性 FOD 后屏幕闪烁For more info and resolution steps, see Knowledge Base article 4481610: Screen flickers after you install Server Core App Compatibility FOD in Windows Server 2019 Server Core.

  • 安装应用兼容性 FOD 并重新启动服务器后,命令控制台窗口框架颜色将更改为不同的蓝色调。After installation of the App Compatibility FOD and reboot of the server, the command console window frame color will change to a different shade of blue.

  • 如果同时选择安装 Internet Explorer 11 可选包,请注意,不支持双击打开本地保存的 .htm 文件。If you choose to also install the Internet Explorer 11 optional package, note that double clicking to open locally saved .htm files is not supported. 但是,可以右键单击并选择“使用 Internet Explorer 打开”,或者可以直接在 Internet Explorer 中选择“文件” -> “打开”来打开此类文件。 However, you can right-click and choose Open with IE, or you can open it directly from Internet Explorer File -> Open.

  • 为了进一步使用应用兼容性 FOD 增强 Server Core 的应用兼容性,IIS 管理控制台现已作为一个可选组件添加到 Server Core。To further enhance the app compatibility of Server Core with the App Compatibility FOD, the IIS Management Console has been added to Server Core as an optional component. 但是,若要使用 IIS 管理控制台,必须先添加应用兼容性 FOD。However, it is absolutely necessary to first add the App Compatibility FOD to use the IIS Management Console. IIS 管理控制台依赖于 Microsoft 管理控制台 (mmc.exe),而后者只能在添加了应用兼容性 FOD 的 Server Core 中使用。IIS Management Console relies on the Microsoft Management Console (mmc.exe), which is only available on Server Core with the addition of the App Compatibility FOD. 使用 Powershell Install-WindowsFeature 添加 IIS 管理控制台。Use Powershell Install-WindowsFeature to add IIS Management Console.

  • 作为一项常规指导,在 Server Core(包含或不包含这些可选包)上安装应用时,有时需要使用无提示安装选项和指令。As a general point of guidance, when installing apps on Server Core (with or without these optional packages) it is sometimes necessary to use silent install options and instructions.

    • 例如,适用于 SQL Server 2016 和 SQL Server 2017 的 SQL Server Management Studio 可以在 Server Core 上安装,如果存在应用兼容性 FOD,则它可以完全正常运行。As an example, SQL Server Management Studio for SQL Server 2016 and SQL Server 2017 can be installed on Server Core and is fully functional when the App Compatibility FOD is present. 请参阅从命令提示符安装 SQL ServerSee, Install SQL Server from the Command Prompt.
    • 如果不需要 SQL Server Management Studio,则无需安装 Server Core 应用兼容性 FOD。If SQL Server Management Studio is not desired, then it is unnecessary to install the Server Core App Compatibility FOD. 请参阅在 Server Core 上安装 SQL ServerSee, Install SQL Server on Server Core.

将功能和可选包添加到脱机 WIM Server Core 映像 Adding capabilities and optional packages to an offline WIM Server Core image

  1. 将 Windows Server 和 Server FOD ISO 映像文件下载到 Windows 计算机上的本地文件夹。Download the Windows Server and Server FOD ISO image files to a local folder on a Windows computer.

  2. 以管理员身份打开 PowerShell 会话,然后使用以下命令将映像文件装载为驱动器:Open a PowerShell session as an administrator and then use the following commands to mount the image files as drives:

    Mount-DiskImage -ImagePath Path_To_ServerFOD_ISO
    Mount-DiskImage -ImagePath Path_To_Windows_Server_ISO
  3. 将 Windows Server ISO 文件的内容复制到本地文件夹(例如 C:\SetupFiles\WindowsServer)。Copy the contents of the Windows Server ISO file to a local folder (for example, C:\SetupFiles\WindowsServer).

  4. 使用以下命令获取 Install.wim 文件中要修改的映像名称。Get the image name you want to modify within the Install.wim file by using the following command.
    使用 $install_wim_path 变量输入位于 ISO 文件的 \Sources 文件夹中 Install.wim 文件的路径。Use the $install_wim_path variable to enter the path to the Install.wim file, located inside the \Sources folder of the ISO file.

    $install_wim_path = "C:\SetupFiles\WindowsServer\sources\install.wim"
    Get-WindowsImage -ImagePath $install_wim_path
  5. 使用以下命令(请将示例变量值替换为自己的值,并重复使用前一命令中的 $install_wim_path 变量),在新文件夹中装载 Install.wim 文件。Mount the Install.wim file in a new folder by using the following command replacing the sample variable values with your own, and reusing the $install_wim_path variable from the previous command.

    • $image_name - 输入要装载的映像名称。$image_name - Enter the name of the image you want to mount.
    • $mount_folder variable - 指定访问 Install.wim 文件的内容时要使用的文件夹。$mount_folder variable - Specify the folder to use when accessing the contents of the Install.wim file.
    $image_name = "Windows Server Datacenter"
    $mount_folder = "c:\test\offline"
    Mount-WindowsImage -ImagePath $install_wim_path -Name $image_name -path $mount_folder
  6. 使用以下命令(请将示例变量值替换为自己的值)将所需的功能和包添加到装载的 Install.wim 映像。Add capabilities and packages you want to the mounted Install.wim image by using the following commands, replacing the sample variable values with your own.

    • $capability_name - 指定要安装的功能(在本例中为 AppCompatibility 功能)的名称。$capability_name - Specify the name of the capability to install (in this case, the AppCompatibility capability).
    • $package_path - 指定要安装的包(在本例中为 Internet Explorer)的路径。$package_path - Specify the path to the package to install (in this case, Internet Explorer).
    • $fod_drive - 指定已装载的 Server FOD 映像的驱动器号。$fod_drive - Specify the drive letter of the mounted Server FOD image.
    $capability_name = "ServerCore.AppCompatibility~~~~"
    $package_path = "D:\"
    $fod_drive = "d:\"
    Add-WindowsCapability -Path $mount_folder -Name $capability_name -Source $fod_drive -LimitAccess
    Add-WindowsPackage -Path $mount_folder -PackagePath $package_path
  7. 使用以下命令(其中使用了前面命令中的 $mount_folder 变量)卸除映像并将更改提交到 Install.wim 文件:Dismount and commit changes to the Install.wim file by using the following command, which uses the $mount_folder variable from previous commands:

    Dismount-WindowsImage -Path $mount_folder -Save

现在,可以在为 Windows Server 安装文件创建的文件夹中运行 setup.exe 来升级服务器(在本示例中,该文件夹为:C:\SetupFiles\WindowsServer)。You can now upgrade your server by running setup.exe from the folder you created for the Windows Server installation files (in this example: C:\SetupFiles\WindowsServer). 现在,此文件夹包含 Windows Server 安装文件及其他功能与可选包。This folder now contains the Windows Server installation files with the additional capabilities and optional packages included.