Skip to content

[Bug]: Aggregate-SecureBootData.ps1 cannot load 1 file, only 2 or more. #421

@jcoester

Description

@jcoester

Is there an existing issue for this?

  • I have searched existing issues

Current Behavior

I hope issues regarding C:\Windows\SecureBoot\ExampleRolloutScripts belong here.
If not, could you point me to the right team?


Following Local Testing (Sample Secure Boot E2E Automation Guide)

Aggregate-SecureBootData.ps1 does not complete the devices if only one is present, resulting in SecureBoot_Dashboard_Latest.html to be empty.

Processing 1 files (streaming, 8 threads):
   Loading 0 files:  (0 batches of ~0 files each)
...
============================================================
STREAMING AGGREGATION COMPLETE
============================================================
  Total Devices:   0

Aggregate-SecureBootData.ps1 works correctly with two devices

Processing 2 files (streaming, 8 threads):
   Loading 2 files:  (2 batches of ~1 files each)
...
============================================================
STREAMING AGGREGATION COMPLETE
============================================================
  Total Devices:   2

Cause:

Aggregate-SecureBootData.ps1 Line 775

$cFiles = $jsonFiles[$cStart..$cEnd]

if ($stTotalChunks -gt 1) {
    Write-Host "   Chunk $($ci + 1)/$stTotalChunks ($($cFiles.Count) files): " -NoNewline -ForegroundColor Gray
} else {
    Write-Host "   Loading $($cFiles.Count) files: " -NoNewline -ForegroundColor Gray
}

Test case 1 device(s)

$jsonFiles.Count => 1
$cFiles.Count => 0

Test case 2 device(s)

$jsonFiles.Count => 2
$cFiles.Count => 2

Fix:

$cFiles = $jsonFiles[$cStart..$cEnd] # Old faulty access for one entry

$cFiles = @($jsonFiles)[$cStart..$cEnd] # New fixed access for one entry

Expected Behavior

Should work with one device, since this is for testing purposes and evaluating, e.g.

Processing 1 files (streaming, 8 threads):
   Loading 1 files:  (1 batches of ~1 files each)
...
============================================================
STREAMING AGGREGATION COMPLETE
============================================================
  Total Devices:   1

Steps To Reproduce

cd C:\Windows\SecureBoot\ExampleRolloutScripts\

& ".\Aggregate-SecureBootData.ps1" `
    -InputPath "C:\Temp\SecureBootTest" ` 
    -OutputPath "C:\Temp\SecureBootReports" 

Start-Process "C:\Temp\SecureBootReports\SecureBoot_Dashboard_Latest.html"

Build Environment

- OS(s): Windows 11 25H2 (Build 26200.8457) - May 12, 2026

Version Information

'C:\Windows\SecureBoot\ExampleRolloutScripts' not part of this repository yet.

Urgency

Medium

Are you going to fix this?

Someone else needs to fix it

Do you need maintainer feedback?

No maintainer feedback needed

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:needs-ownerNeeds an issue owner to be assignedstate:needs-triageNeeds to triaged to determine next stepstype:bugSomething isn't workingurgency:mediumImportant with a moderate impact

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions