套用到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 Windows 11 IoT Enterprise, version 23H2

原始發佈日期: 2025年2月4日

KB 識別碼:5053484

變更日期

變更描述

2025年5月1日

新增了 powerShell 腳本 Make2023BootableMedia.ps1 下載連結下方的 [ 附注 ]。

簡介

本文所述的 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 影像檔,

  • [USB 快閃磁碟驅動器],

  • 本機磁碟驅動器路徑,或

  • 網路驅動器機路徑。

您可以在 [ 下載並安裝 Windows ADK ] 頁面上找到 Windows ADK) (的最新 Windows 評定和部署套件,而且此腳本必須正常運作。

注意事項

  • Make2023BootableMedia.ps1 腳本應該從提升許可權的 PowerShell 提示執行。

  • 您必須提供已套用最新維護更新的媒體來源 (-MediaPath) 腳本。

語法

PowerShell

Make2023BootableMedia.ps1

  •      [-MediaPath <path>]

  •      [-TargetType <type>]

  •      [-ISOPath <path>]

  •      [-USBDrive <drive:>]

  •      [-FileSystem <type>]

  •      [-NewMediaPath <path>]

  •      [-StagingDir <path>]

參數

-MediaPath <路徑>

要用來做為比較基準之媒體資料夾或 ISO 檔案的路徑。 媒體資料夾可以是本機磁碟驅動器路徑或網路共用。

-TargetType <類型>

要 (ISO、USB 或本機) 建立的媒體類型。

  • ISO:將 -MediaPath 中指定的媒體轉換為 2023 可開機 ISO 檔案。 Targets -ISOPath。

  • USB:將在 -MediaPath 中指定的媒體轉換為 2023 可開機影像,並將它寫入 -USBDrive。

  • 本機:將 -MediaPath 中指定的媒體轉換為複製到 -NewMediaPath 的 2023 可開機影像。

-ISOPath <路徑>

要從 -MediaPath 建立之新 ISO 檔案的路徑。

-USBDrive <磁碟驅動器:>

目標USB磁碟驅動器的驅動器號 (範例 E:) 。

-FileSystem <類型>

此參數為選用。 它允許指定檔案系統,以 (FAT32 或 ExFAT) 格式化 USB 磁碟驅動器。 預設值為 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

需要更多協助嗎?

想要其他選項嗎?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。