在 Powershell 或 CMD 中打开 Internet Explorer

Opening Internet Explorer in Powershell or CMD

我正在使用 Windows Server 2016 Standard 核心,但不知道如何打开 Internet Explorer。

Internet Explorer 在 Windows Core 中不可用。

但是,如果您是 运行 Windows Server 2019,那么您可以安装 Server Core App Compatibility Features on Demand and then add support for IE11.

为此,首先,添加对服务器核心应用程序兼容性 FoD 的支持(下面列出的所有步骤都可以在我链接到的文档中找到):

  1. Download the Server FOD optional packages ISO, and copy the ISO to a shared folder on your local network:

    • If you have a volume license you can download the Server FOD ISO image file from the same portal where the OS ISO image file is obtained: Volume Licensing Service Center.
    • The Server FOD ISO image file is also available on the Microsoft Evaluation Center or on the Visual Studio portal for subscribers.
  2. Sign in as Administrator on the Server Core computer that is connected to your local network and that you want to add the FOD to.
  3. Use net use, or some other method, to connect to the location of the FOD ISO.
  4. Copy the FOD ISO to a local folder of your choosing.
  5. Start PowerShell by entering powershell.exe at a command prompt.
  6. Mount the FoD ISO by using the following command:
Mount-DiskImage -ImagePath drive_letter:\folder_where_ISO_is_saved\ISO_filename.iso
  1. Type exit to exit PowerShell.
  2. Run the following command:
DISM /Online /Add-Capability /CapabilityName:"ServerCore.AppCompatibility~~~~0.0.1.0" /Source:drive_letter_of_mounted_ISO: /LimitAccess
  1. After the progress bar completes, restart the operating system.

一旦完成,您就可以开始安装 Internet Explorer:

  1. 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. Start PowerShell by entering powershell.exe at a command prompt.
  3. Mount the FoD ISO by using the following command:
Mount-DiskImage -ImagePath drive_letter:\folder_where_ISO_is_saved\ISO_filename.iso
  1. Type exit to exit PowerShell.
  2. Run the following command:
Dism /online /add-package:drive_letter_of_mounted_iso:"Microsoft-Windows-InternetExplorer-Optional-Package~31bf3856ad364e35~amd64~~.cab"
  1. After the progress bar completes, restart the operating system.

通过完成上述步骤,您将安装 Windows 核心版 Internet Explorer。它与桌面版本不同,原因很明显,Server Core 缺少大部分 GUI 包 - Microsoft 主要提供它用于 IIS 的调试和支持。