应用对象
Windows Server 2012 Windows Server 2012 R2 Windows 10 Windows 10 Education, version 1607 Windows 10 Professional version 1607 Windows 10 Enterprise, version 1607 Windows 10 Enterprise version 1607 Windows 10 Enterprise, version 1809 Windows 10 Professional Education version 1607 Windows 10 Pro Education, version 1607 Windows Server 2016 Windows Server 2019 Windows Server 2022 Windows 10 Home and Pro, version 21H2 Windows 10 Enterprise and Education, version 21H2 Windows 10 IoT Enterprise, version 21H2 Windows 10 Home and Pro, version 22H2 Windows 10 Enterprise Multi-Session, version 22H2 Windows 10 Enterprise and Education, version 22H2 Windows 10 IoT Enterprise, version 22H2 Windows 11 Home and Pro, version 21H2 Windows 11 Enterprise Multi-Session, version 21H2 Windows 11 Enterprise and Education, version 21H2 Windows 11 IoT Enterprise, version 21H2 Windows 11 Home and Pro, version 22H2 Windows 11 Enterprise Multi-Session, version 22H2 Windows 11 Enterprise and Education, version 22H2 Windows 11 IoT Enterprise, version 22H2 Azure Local, version 22H2 Windows 11 Home and Pro, version 23H2 Windows 11 Enterprise and Education, version 23H2 Windows 11 Enterprise Multi-Session, version 23H2 DO_NOT_USE_Windows 11 IoT Enterprise, version 23H2

原始发布日期: 2025 年 2 月 4 日

KB ID:5053484

更改日期

更改说明

2025 年 5 月 1 日

在 Make2023BootableMedia.ps1 PowerShell 脚本的下载链接下方添加了 “注释 ”。

简介

本文中所述的 PowerShell 脚本可用于更新 Windows 可启动媒体,以便在信任“Windows UEFI CA 2023”证书的系统上使用该媒体。 KB5025885:如何管理与 CVE-2023-24932 关联的安全启动更改的 Windows 启动管理器吊销中介绍了此证书。

如何获取 PowerShell 脚本

下载图标 立即下载 Make2023BootableMedia.ps1 PowerShell 脚本

注意 此链接将下载最新版本的 PowerShell 脚本。 有关脚本发布历史记录的信息,请参阅 microsoft/secureboot_objects

描述

Make2023BootableMedia.ps1 PowerShell 脚本将 Windows 媒体上的启动管理器支持更新为由新的“Windows UEFI CA 2023”证书签名的启动管理器。 输入和输出可以是以下类型的可启动媒体:

  • ISO CD/DVD 映像文件,

  • U 盘,

  • 本地驱动器路径,或

  • 网络驱动器路径。

可以在下载并安装 Windows ADK 页上找到最新的 Windows 评估和部署工具包 (Windows ADK) ,并且此脚本必须正常工作。

注意

  • 应从提升的 PowerShell 提示符运行 Make2023BootableMedia.ps1 脚本。

  • 必须为脚本提供媒体源 (-MediaPath) ,该源应用了最新的服务更新。

语法

PowerShell

Make2023BootableMedia.ps1

  •      [-MediaPath <path>]

  •      [-TargetType <type>]

  •      [-ISOPath <path>]

  •      [-USBDrive <drive:>]

  •      [-FileSystem <type>]

  •      [-NewMediaPath <path>]

  •      [-StagingDir <path>]

参数

-MediaPath <路径>

要用作基线的媒体文件夹或 ISO 文件的路径。 媒体文件夹可以是本地驱动器路径或网络共享。

-TargetType <type>

要 (ISO、USB 或 LOCAL) 创建的媒体类型。

  • ISO:将 -MediaPath 中指定的媒体转换为 2023 可启动 ISO 文件。 Targets -ISOPath。

  • USB:将 -MediaPath 中指定的媒体转换为 2023 可启动映像,并将其写入 -USBDrive。

  • LOCAL:将 -MediaPath 中指定的媒体转换为复制到 -NewMediaPath 的 2023 可启动映像。

-ISOPath <路径>

要从 -MediaPath 创建的新 ISO 文件的路径。

-USBDrive <驱动器:>

目标 U 盘的驱动器号 (示例 E:) 。

-FileSystem <类型>

此参数是可选的。 它允许指定文件系统以使用 (FAT32 或 ExFAT) 格式化 U 盘。 默认值为 ExFAT。

-NewMediaPath <路径>

当 TargetType 为 LOCAL 时是必需的。 -MediaPath 内容在此处复制,然后更新。

-StagingDir <路径>

重写此脚本使用的默认临时暂存路径。 系统 %TEMP% 默认与随机子文件夹一起使用。

示例命令

Make2023BootableMedia.ps1 -MediaPath C:\Media\Win10Media -TargetType ISO -ISOPath C:\Media\Win10_Updated.iso

Make2023BootableMedia.ps1 -MediaPath C:\Media\Win11.iso -TargetType ISO -ISOPath C:\Media\Win11_Updated.iso

Make2023BootableMedia.ps1 -MediaPath \\server\share\Win11_Media -TargetType ISO -ISOPath C:\Media\Win11_Updated.iso

Make2023BootableMedia.ps1 -MediaPath \\server\share\Win11.iso -TargetType ISO -ISOPath C:\Media\Win11_Updated.iso

Make2023BootableMedia.ps1 -MediaPath C:\Media\Win1124H2 -TargetType USB -USBDrive H:

Make2023BootableMedia.ps1 -MediaPath C:\Media\Win11.iso -TargetType USB -USBDrive E:

Make2023BootableMedia.ps1 -MediaPath C:\Media\Win1124H2 -TargetType LOCAL -NewMediaPath C:\Media\Win1124H2_Updated

Make2023BootableMedia.ps1 -MediaPath H:\Media\Win11.iso -TargetType LOCAL -NewMediaPath R:\Win11_Updated

Make2023BootableMedia.ps1 -MediaPath C:\Media\Win1124H2 -TargetType ISO -ISOPath C:\Media\Win1124H2_Updated.iso -StagingDir C:\Temp\Win1124H2

需要更多帮助?

需要更多选项?

了解订阅权益、浏览培训课程、了解如何保护设备等。