Applies To
Windows 10, version 1607, all editions Win 10 Ent LTSB 2016 Win 10 IoT Ent LTSB 2016 Windows 10, version 1809, all editions Win 10 Ent LTSC 2019 Win 10 IoT Ent LTSC 2019 Windows 10 ESU Windows 10 Enterprise LTSC 2021 Windows 10 IoT Enterprise LTSC 2021 Windows 11 version 23H2, all editions Windows 11 version 24H2, all editions Windows 11 version 25H2, all editions Windows 11 version 26H1, all editions Windows Server 2016 Windows Server 2019 Windows Server 2022 Windows Server, version 23H2 Windows Server 2025

原始出版日期: 2026年3月16日

KB ID:5084567

本文內容

概觀

本指南說明了使用 群組原則及漸進式部署波次,自動部署 Windows 安全開機資料庫憑證更新系統。

安全開機憑證推出自動化是一個基於 PowerShell 的系統,能以受控且漸進的方式部署 Windows 安全啟動資料庫憑證更新至已加入網域的機器。

回到頁首

主要特色

功能

描述

漸進式推廣

1 > 2 > 4 > 8...... 每個桶的裝置數

自動阻擋

無法存取裝置的桶被排除

自動化 GPO 部署

單一 orchestrator 腳本能處理所有事情

排程任務執行

不需要互動提示

即時監控

狀態檢視器與進度條

回到頁首 

憑證匯報設定參考

在本節中

AvailableUpdatesPolicy 群組政策

登錄位置

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecureBoot

姓名

可取得更新政策

0x5944 (DWORD)

這是由 GPO/ADMX 控制的金鑰,內容如下:

  • 重啟後依然存在

  • 是由群組原則/MDM 設定的

  • 不會導致重試迴圈, (透過 ClearRolloutFlags 清除)

  • 是政策驅動部署的正確金鑰嗎?

參考資料:群組原則 物件 (GPO) Windows 裝置安全開機方法,並由 IT 管理更新

返回「憑證匯報設定參考」 

WinCSFlags - Windows 配置系統旗標

網域管理員也可以選擇使用 Windows 作業系統更新 (Windows) 的 Windows 組態系統 ,將安全開機更新部署於已加入網域的 Windows 用戶端與伺服器之間。 它包含 命令列介面 (CLI) 工具 ,用於查詢並套用安全開機設定至本地機器。

功能名稱

WinCS 金鑰

描述

Feature_AllKeysAndBootMgrByWinCS

F33E0C8E002

啟用此金鑰後,可在您的裝置上安裝以下 Microsoft 提供的安全開機新憑證。

  • Microsoft Corporation KEK 2K CA 2023

  • Windows UEFI CA 2023

  • Microsoft UEFI CA 2023

  • Microsoft Option UEFI ROM CA 2023

參考資料: Windows 組態系統 (WinCS) 安全開機 API

返回「憑證匯報設定參考」

回到頁首

Architecture

架構工作流程

回到頁首 

第一階段:企業層級的偵測與狀態監控

在本節中

第一階段所需腳本

安全啟動庫存資料收集腳本範例

範例劇本名稱

目的 

繼續奔跑 

範例劇本 Detect-SecureBootCertUpdateStatus.ps1 

收集裝置狀態資料 

每個端點都透過 GPO) ( 

範例劇本 Aggregate-SecureBootData.ps1 

產生報告與儀表板 

管理員工作站 

範例劇本 Deploy-GPO-SecureBootCollection.ps1

自動化建立 GPO 以進行資料收集 

網域控制器 

安全開機憑證狀態儀表板

返回「第一階段:企業層級的偵測與狀態監控」

地方檢測

在透過 GPO 部署前,先在單一機器上測試收集腳本以驗證功能。 

  • 在本地執行集合腳本 開啟一個提升的 PowerShell 提示字元並執行:

    & .\Detect-SecureBootCertUpdateStatus.ps1 -OutputPath “C:\Temp\SecureBootTest” 

  • 驗證 JSON 輸出

    # View the collected data  Get-Content 「C:\Temp\SecureBootTest\*_latest.json」 |ConvertFrom-Json |Format-List

    需驗證  的關鍵欄位 • SecureBootEnabled – 應為真或假整體狀態 – 完成、ReadyForUpdate、NeedsData 或 Error BucketHash – 用於信心資料匹配的裝置桶 • SecureBootTaskEnabled - 顯示安全開機更新任務的狀態。

  • 測試聚合腳本

    # Generate reports from collected data  & .\Aggregate-SecureBootCertStatus.ps1”     -InputPath 「C:\Temp\SecureBootTest」 '     -OutputPath 「C:\Temp\SecureBootReports」   # 打開 HTML 儀表板 

    Start-Process "C:\Temp\SecureBootReports\SecureBoot_Dashboard_*.html"

返回「第一階段:企業層級的偵測與狀態監控」 

網路共享設定

  • 建立網路分享 在您的檔案伺服器上,建立一個專門的收藏資料共享資料夾:

    # Run on file server as Administrator  $SharePath = 「D:\SecureBootCollection」 $ShareName = “SecureBootData$”   # 建立資料夾 New-Item -ItemType Directory -Path $SharePath -Force   # 建立隱藏分享 ($ 後綴隱藏瀏覽列表) New-SmbShare -名稱 $ShareName -路徑$SharePath '     -說明「安全開機憑證狀態收集」     - FullAccess「網域管理員」     - ChangeAccess「已認證使用者」

  • 設定 NTFS 權限

    # Get current ACL  $Acl = Get-Acl $SharePath   # 允許已認證使用者撰寫檔案 $WriteRule = New-Object System.Security.AccessControl.FileSystemAccessRule (     「已認證使用者」,     「建立檔案、附加資料、寫入屬性、寫擴展屬性」,     「容器繼承,物件繼承」,     「沒有」,     「允許」 ) $Acl.AddAccessRule ($WriteRule)   # 允許網域管理員完全控制 (聚合) $AdminRule = New-Object System.Security.AccessControl.FileSystemAccessRule (     「網域管理員」,     「全控」,     「容器繼承,物件繼承」,     「沒有」,     「允許」 ) $Acl.AddAccessRule ($AdminRule)   # 套用權限 Set-Acl -路徑 $SharePath -AclObject $Acl 

  • 驗證分享存取權

    # Test from a domain-joined workstation  Test-Path “\\fileserver\SecureBootData$” # 應該回歸:真實

返回「第一階段:企業層級的偵測與狀態監控」 

GPO 部署

使用網域控制器提供的自動化腳本:

# 在網域控制器上執行,作為互動式 OU 區塊的網域管理員 – 推薦 # 將「Contoso.com」、「Contoso」換成網域名稱 # 將 FILESERVER 替換成檔案伺服器名稱。  腳本顯示要部署 GPO 的 OU 清單 .\Deploy-GPO-SecureBootCollection.ps1     -網域名稱「contoso.com」     -自動偵測     -CollectionSharePath 「\\FILESERVER\SecureBootLogs$」     -ScriptSourcePath “.\Detect-SecureBootCertUpdateStatus.ps1” '     -排程「每日」     -行程時間「14:00」     -隨機延遲 4 

此腳本將執行以下操作:

  • 建立指定名稱的新 GPO

  • 將收集腳本複製到 SYSVOL 以達到高可用性

  • 配置電腦啟動腳本

  • 連結 GPO 與目標 OU

  • 可選擇性地建立排程任務以供定期收集

下表根據您的車隊規模,提供延遲時間的指引。

機隊規模 

延遲範圍 

1-10K 裝置 

4 小時 

10K-50K 裝置 

8 小時 

50K+ 裝置 

12-24小時

返回「第一階段:企業層級的偵測與狀態監控」 

GPO 設定摘要

設定 

位置 

 

啟動腳本 

電腦設定 →腳本 

Detect-SecureBootCertUpdateStatus.ps1 

腳本參數 

(一樣)  

-輸出路徑「\\server\share$」 

執行政策 

Computer Config → 管理員 Templates → PowerShell 

允許本地與遠端簽署 

排定的工作 

電腦設定 →偏好設定→排程任務 

每日/每週收款

返回「第一階段:企業層級的偵測與狀態監控」 

驗證

  • Force GPO 更新於 Test Machine

    ## On a test workstation  GP更新/力   # 重新啟動客戶端機器到啟動腳本,否則會在下一個排程觸發。Restart-Computer -原力

  • 驗證資料收集

    # 檢查資料是否 (檔案伺服器或任何機器收集) Get-ChildItem “\\fileserver\SecureBootData$” |      Sort-Object 最後寫作時間 -下降 |      Select-Object -前十  名 # 驗證 JSON 內容 Get-Content “\\fileserver\SecureBootData$\TESTPC_latest.json” |ConvertFrom-Json 

  • 請檢查 GPO 申請

    # 確認 GPO 已套用到電腦 GPRESULT /R /scope:computer |Select-String 「SecureBoot」 s 腳本也會儲存本地副本以備冗餘: Get-ChildItem 「C:\ProgramData\SecureBootCollection\」 

返回「第一階段:企業層級的偵測與狀態監控」

回到頁首 

第二階段:安全開機憑證更新編排腳本

重要: 確保第一階段完成,包括在每個端點收集資料至遠端伺服器共享。

在本節中

第二階段所需腳本

安全啟動庫存資料收集腳本範例

範例劇本名稱

目的 

執行 

範例劇本 Detect-SecureBootCertUpdateStatus.ps1  

收集裝置狀態資料 

每個端點都透過 GPO) ( 

範例劇本 Aggregate-SecureBootData.ps1

產生報告與儀表板 

管理員工作站 

範例劇本 Deploy-GPO-SecureBootCollection.ps1

自動化建立 GPO 以進行資料收集 

網域控制器 

範例劇本 Start-SecureBootRolloutOrchestrator.ps1

全自動化、持續協調,並自動部署 GPO 以安裝憑證

管理員工作站 

範例劇本 Deploy-OrchestratorTask.ps1

部署 Orchestrator 腳本作為排程任務以進行自動部署

網域控制器

範例劇本 Get-SecureBootRolloutStatus.ps1

從任何工作站查看安全開機憑證的推出狀態

管理員工作站

範例劇本 Enable-SecureBootUpdateTask.ps1

 啟用安全開機更新任務

在任務被停用的端點 (如果已停用,則只能執行一次以啟用該任務)

返回「第二階段:安全開機憑證更新協調腳本」 

Start-SecureBootRolloutOrchestrator.ps1

  • 目的: 全自動化、持續編排,並自動部署 GPO。

  • 它有什麼作用

    • 通話 Aggregate-SecureBootData.ps1 裝置狀態

    • 利用漸進倍增產生滾動波

    • 建立用於憑證部署的 GPO,使用以下方法之一

      • 安全開機群組政策 AvailableUpdatesPolicy = 0x5944 (預設)

      • WinCS 方法 (參數 –使用WinCS)

    • 建立 AD 安全群組以進行目標鎖定

    • 將電腦帳號加入安全群組

    • 配置 GPO 安全過濾

    • 連結 GPO 與目標 OU

    • 監控被阻塞的桶 (無法接觸的裝置)

    • 裝置恢復時自動解除封鎖

  • 使用方式

    # Interactive (testing) .\Start-SecureBootRolloutOrchestrator.ps1     -AggregationInputPath “\\fileserver\SecureBootData$” '     - ReportBasePath 「C:\SecureBootReports」     -投票間隔 30 分鐘

    # Interactive (testing), leveraging WinCS method .\Start-SecureBootRolloutOrchestrator.ps1     -AggregationInputPath “\\fileserver\SecureBootData$” '     - ReportBasePath 「C:\SecureBootReports」     -PollInterval Minutes 1440 -UseWinCS

  • 管理員指令

    # List blocked buckets .\Start-SecureBootRolloutOrchestrator.ps1 -ReportBasePath “C:\SecureBootReports” -ListBlockedBuckets

    # Unblock specific bucket .\Start-SecureBootRolloutOrchestrator.ps1 -ReportBasePath “C:\SecureBootReports” -UnblockBucket “Dell|緯度5520|BIOS1.2”

    # Unblock all .\Start-SecureBootRolloutOrchestrator.ps1 -ReportBasePath “C:\SecureBootReports” -UnblockAll

  • 參數

    參數

    預設值

    描述

    聚合輸入路徑

    必要

    UNC 路徑至端點 JSON 檔案

    報告基礎路徑

    必要

    報告與狀態的本地路徑

    TargetOU

    網域根

    OU 以連結 GPO

    WavePrefix

    SecureBoot-Rollout

    GPO/群組命名前綴

    MaxWaitHours

    72

    檢查裝置可達性前幾小時

    輪詢間隔分鐘

    1440

    狀態檢查之間的分鐘

    試演

    False

    展示如果沒有改變會發生什麼

返回「第二階段:安全開機憑證更新協調腳本」  

Deploy-OrchestratorTask.ps1

  • 目的: 將編排器部署為 Windows 排程任務。

  • 權益

    • 執行策略繞過 (沒有 PowerShell 安全提示)

    • 持續在背景中運行

    • 不需要使用者互動

    • 重啟版存活

  • 使用方式

    • 建議 (用網域服務帳號部署)

      • 使用 AvailableUpdates 群組原則 (預設方法)

        .\Deploy-OrchestratorTask.ps1     -AggregationInputPath “\\server\SecureBootData$” '     - ReportBasePath 「C:\SecureBootReports」     -ServiceAccount 「DOMAIN\svc_secureboot」

      • 使用 WinCS 方法

        .\Deploy-OrchestratorTask.ps1     -AggregationInputPath “\\server\SecureBootData$” '     - ReportBasePath 「C:\SecureBootReports」     -ServiceAccount “DOMAIN\svc_secureboot” - UseWinCS

    • 使用 SYSTEM 帳號部署

      • 使用 AvailableUpdates 群組原則 (預設方法)

        .\Deploy-OrchestratorTask.ps1     -AggregationInputPath “\\server\SecureBootData$” '     - ReportBasePath 「C:\SecureBootReports」

      • 使用 WinCS method.\Deploy-OrchestratorTask.ps1

            -AggregationInputPath “\\server\SecureBootData$” '     - ReportBasePath “C:\SecureBootReports” - UseWinCS

      • 服務帳戶要求

        • 新 GPO、New-ADGroup、Add-ADGroupMember) 網域管理員 (

        • JSON 檔案分享的讀取存取

        • 寫入 ReportBasePath 的存取權限

返回「第二階段:安全開機憑證更新協調腳本」  

Get-SecureBootRolloutStatus.ps1

  • 目的: 從任何工作站查看推廣進度。

  • 它顯示的內容

    • 排程任務狀態 (執行中/就緒/停止)

    • 當前波數

    • 目標裝置與更新裝置

    • 視覺進度條

    • 阻塞桶摘要

    • 最新 HTML 儀表板連結

  • 使用方式

    # Quick status check .\Get-SecureBootRolloutStatus.ps1 -ReportBasePath 「C:\SecureBootReports」

    # Continuous monitoring (refreshes every 30 seconds) .\Get-SecureBootRolloutStatus.ps1 -ReportBasePath 「C:\SecureBootReports」 -Watch 30

    # View blocked buckets .\Get-SecureBootRolloutStatus.ps1 -ReportBasePath “C:\SecureBootReports” -ShowBlocked

    # View wave history .\Get-SecureBootRolloutStatus.ps1 -ReportBasePath 「C:\SecureBootReports」 -ShowWaves

    # View recent log .\Get-SecureBootRolloutStatus.ps1 -ReportBasePath “C:\SecureBootReports” -ShowLog

    # Open dashboard in browser .\Get-SecureBootRolloutStatus.ps1 -ReportBasePath “C:\SecureBootReports” -OpenDashboard

  • 取樣輸出

    ==============================================================    安全啟動啟動狀態    2026-02-17 19:30:00 ======================================================

    Scheduled Task: Running

    ROLLOUT PROGRESS ---------------------------------------- 狀態:進行中 當前浪:5 目標總數:1250 總更新:847

    Progress: [█████████████████████░░░░░░░░░░░░░░░░░░░] 67.8%

    BLOCKED BUCKETS: 2 buckets need attention   詳情請使用 -ShowBlocked 查詢

    LATEST DASHBOARD C:\SecureBootReports\Aggregation_20260217_193000\SecureBoot_Dashboard.html __________________________________________________________________________________________

返回「第二階段:安全開機憑證更新協調腳本」

回到頁首 

端對端部署步驟 (快速參考指南)

在本節中

第一階段:偵測基礎設施

  • 步驟 1:建立收藏 分享

    # On file server $sharePath = “D:\SecureBootData” New-Item -ItemType Directory -Path $sharePath -Force New-SmbShare -name “SecureBootData$” -Path $sharePath - FullAccess “Domain Admins” -ChangeAccess “Domain Computers”

    # Set NTFS permissions $acl = Get-Acl $sharePath $rule = New-Object System.Security.AccessControl.FileSystemAccessRule (「Domain Computers」、「Modify」、「Allow」) $acl。AddAccessRule ($rule) Set-Acl $sharePath $acl

  • 步驟 2:部署偵測 GPO

    .\Deploy-GPO-SecureBootCollection.ps1 `     - 網域名稱「contoso.com」     -OUPath 「OU=工作站,DC=contoso,DC=com」     -CollectionSharePath 「\\server\SecureBootData$」

  • 步驟 3:等待端點回報 24-48 小時 ()

    # 檢查收款進度 (Get-ChildItem “\\server\SecureBootData$” -Filter “*.json”) 。伯爵

返回「端對端部署步驟 (快速參考指南) 」 

第二階段:協調推出

  • 步驟四:先修條件檢查

    • 偵測 GPO 部署 (第二步)

    • 至少有 50+ 個端點報告 JSON

    • 具有網域管理員權限的服務帳號

    • 使用 PowerShell 5.1+ 的管理伺服器

  • 步驟 5:部署 Orchestrator 作為排程任務

    .\Deploy-OrchestratorTask.ps1 `     -AggregationInputPath “\\server\SecureBootData$” '     - ReportBasePath 「C:\SecureBootReports」     -ServiceAccount 「DOMAIN\svc_secureboot」

  • 步驟六:監控進度

    .\Get-SecureBootRolloutStatus.ps1 -ReportBasePath "C:\SecureBootReports"

  • 步驟7:檢視儀表板

    .\Get-SecureBootRolloutStatus.ps1 -ReportBasePath "C:\SecureBootReports" -OpenDashboard

  • 步驟八:管理阻塞桶

    # List blocked .\Start-SecureBootRolloutOrchestrator.ps1 -ReportBasePath “C:\SecureBootReports” -ListBlockedBuckets

    # Investigate and unblock .\Start-SecureBootRolloutOrchestrator.ps1 -ReportBasePath “C:\SecureBootReports” -UnblockBucket “Manufacturer|模型|BIOS」

  • 步驟 9:確認完成

    .\Get-SecureBootRolloutStatus.ps1 -ReportBasePath "C:\SecureBootReports" # 狀態應該顯示「完成」

返回「端對端部署步驟 (快速參考指南) 」  

State Files

編排器在 ReportBasePath\RolloutState \ 中維持狀態:

檔案

描述

RolloutState.json

波浪歷史、目標裝置、狀態

BlockedBuckets.json

需要調查的桶

DeviceHistory.json

以主機名稱追蹤裝置

Orchestrator_YYYYMMDD.log

每日活動日誌

返回「端對端部署步驟 (快速參考指南) 」 

回到頁首 

疑難排解

在本節中

配器無法進展

  1. 檢查排程任務

    Get-ScheduledTask -TaskName "SecureBoot-Rollout-Orchestrator"

  2. 檢查日誌

    Get-Content "C:\SecureBootReports\RolloutState\Orchestrator_*.log" -Tail 50

  3. 驗證 JSON 資料的新鮮性

    (Get-ChildItem "\\server\SecureBootData$" -Filter "*.json" | Where-Object { $_.LastWriteTime -gt (Get-Date).AddDays(-1) }).Count

回到「故障排除」 

阻塞桶

  1. 名單已封鎖。

    .\Start-SecureBootRolloutOrchestrator.ps1 -ReportBasePath "C:\SecureBootReports" -ListBlockedBuckets

  2. 調查裝置可達性。

  3. 檢查韌體是否有問題。

  4. 調查後解除封鎖。

回到「故障排除」  

GPO 未申請

  1. 確認 GPO 的存在。

    Get-GPO -Name "SecureBoot-Rollout-Wave*"

  2. 檢查安全過濾。

    Get-GPPermission -Name "GPO-Name" -All

  3. 確認電腦是否在安全群組中。

  4. 對目標套用 GPO。

    gpupdate /force

回到「故障排除」

回到頁首 

Need more help?

Want more options?

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