diff --git a/.gitattributes b/.gitattributes
index 237eb06..c483d9a 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -2,8 +2,13 @@
# Do not add a global autocrlf rule for these paths.
package/docs/** linguist-documentation
-# Owner-signed files (eight PowerShell files and the manifest); cr-at-eol because their working-tree line endings are CRLF.
+# Frozen Windows PowerShell 5.1 fixtures of 2.2.0: byte-exact, never converted (their SHA-256 are listed in fixtures.sha256; the folder also carries its own .gitattributes).
+tests/fixtures/** -text
+
+# Owner-signed files (ten PowerShell files, the module manifest included, and the inventory manifest); cr-at-eol because their working-tree line endings are CRLF.
package/Invoke-PraRemoteMailbox.ps1 -text whitespace=blank-at-eol,space-before-tab,blank-at-eof,cr-at-eol
+package/PraRemoteMailbox.psd1 -text whitespace=blank-at-eol,space-before-tab,blank-at-eof,cr-at-eol
+package/PraRemoteMailbox.psm1 -text whitespace=blank-at-eol,space-before-tab,blank-at-eof,cr-at-eol
package/module/PRA.Common.psm1 -text whitespace=blank-at-eol,space-before-tab,blank-at-eof,cr-at-eol
package/module/PRA.Directory.psm1 -text whitespace=blank-at-eol,space-before-tab,blank-at-eof,cr-at-eol
package/module/PRA.Backup.psm1 -text whitespace=blank-at-eol,space-before-tab,blank-at-eof,cr-at-eol
@@ -22,19 +27,65 @@ package/README.md -text whitespace=blank-at-eol,space-before-tab,blank-at-eof,cr
package/LICENSE -text whitespace=blank-at-eol,space-before-tab,blank-at-eof,cr-at-eol
package/docs/PraRemoteMailbox-Guide.html -text whitespace=blank-at-eol,space-before-tab,blank-at-eof,cr-at-eol
package/docs/PraRemoteMailbox-Guide.md -text whitespace=blank-at-eol,space-before-tab,blank-at-eof,cr-at-eol
-package/docs/images/console-apply.png -text
-package/docs/images/console-preview.png -text
-package/docs/images/gui-fluent.png -text
+package/docs/PraRemoteMailbox-UserGuide.html -text whitespace=blank-at-eol,space-before-tab,blank-at-eof,cr-at-eol
+package/docs/PraRemoteMailbox-UserGuide.md -text whitespace=blank-at-eol,space-before-tab,blank-at-eof,cr-at-eol
+package/docs/images/console-next-cloud-light.png -text
+package/docs/images/console-next-global-light.png -text
+package/docs/images/console-next-light.png -text
+package/docs/images/console-next-package-light.png -text
+package/docs/images/console-next-rollback-light.png -text
+package/docs/images/console-run-cloud-light.png -text
+package/docs/images/console-run-early-light.png -text
+package/docs/images/console-run-finished-dark.png -text
+package/docs/images/console-run-finished-light.png -text
+package/docs/images/console-run-grant-light.png -text
+package/docs/images/console-run-package-light.png -text
+package/docs/images/console-run-rollback-light.png -text
+package/docs/images/console-run-waiting-light.png -text
+package/docs/images/console-settings-light.png -text
+package/docs/images/console-setup-dark.png -text
+package/docs/images/console-setup-light.png -text
+package/docs/images/console-setup-lights-light.png -text
+package/docs/images/console-setup-next-light.png -text
+package/docs/images/console-setup-red-light.png -text
+package/docs/images/console-setup-red-lights-light.png -text
+package/docs/images/console-task-ad-light.png -text
+package/docs/images/console-task-check-light.png -text
+package/docs/images/console-task-continue-light.png -text
+package/docs/images/console-task-finalize-light.png -text
+package/docs/images/console-task-identity-light.png -text
+package/docs/images/console-task-light.png -text
+package/docs/images/console-task-package-selected-light.png -text
+package/docs/images/console-task-rollback-light.png -text
+package/docs/images/console-task-rollback-selected-light.png -text
+package/docs/images/console-task-scope-light.png -text
+package/docs/images/console-verify-before-light.png -text
+package/docs/images/console-verify-check-light.png -text
+package/docs/images/console-verify-cloud-light.png -text
+package/docs/images/console-verify-light.png -text
+package/docs/images/console-verify-rollback-light.png -text
+package/docs/images/console-verify-scope-light.png -text
+package/docs/images/guide-dictionary-light.png -text
package/docs/images/readme-banner-dark.png -text
package/docs/images/readme-banner-light.png -text
package/docs/images/readme-flows-dark.png -text
package/docs/images/readme-flows-light.png -text
package/docs/images/readme-how-dark.png -text
package/docs/images/readme-how-light.png -text
+package/docs/images/readme-path-dark.png -text
+package/docs/images/readme-path-light.png -text
package/docs/images/readme-permissions-dark.png -text
package/docs/images/readme-permissions-light.png -text
package/docs/images/readme-principles-dark.png -text
package/docs/images/readme-principles-light.png -text
-package/docs/images/report-warning.png -text
-package/docs/images/report.png -text
+package/docs/images/readme-rights-dark.png -text
+package/docs/images/readme-rights-light.png -text
+package/docs/images/readme-transfer-dark.png -text
+package/docs/images/readme-transfer-light.png -text
+package/docs/images/readme-why-dark.png -text
+package/docs/images/readme-why-light.png -text
+package/docs/images/report-global-light.png -text
+package/docs/images/report-global-recover-light.png -text
+package/docs/images/report-phase-light.png -text
+package/docs/images/report-phase-warning-light.png -text
CHANGELOG.md -text whitespace=blank-at-eol,space-before-tab,blank-at-eof,cr-at-eol
diff --git a/.github/ci.json b/.github/ci.json
index 48bc505..604b2c8 100644
--- a/.github/ci.json
+++ b/.github/ci.json
@@ -6,7 +6,9 @@
"tests/PraRemoteMailbox.Tests.ps1",
"tests/PraRemoteMailbox.Gui.Tests.ps1",
"tests/PackageIntegrity.Tests.ps1",
- "tests/PraReport.Tests.ps1"
+ "tests/PraReport.Tests.ps1",
+ "tests/PraLegacyFixtures.Tests.ps1",
+ "tests/PraDocumentation.Tests.ps1"
],
"packageBuilder": "tools/New-PraPackage.ps1",
"packageEntry": "Invoke-PraRemoteMailbox.ps1"
diff --git a/.github/scripts/Install-PowerShell.ps1 b/.github/scripts/Install-PowerShell.ps1
new file mode 100644
index 0000000..382a21a
--- /dev/null
+++ b/.github/scripts/Install-PowerShell.ps1
@@ -0,0 +1,51 @@
+#Requires -Version 5.1
+<#
+.SYNOPSIS
+ CI only. Makes sure that the pwsh used by the next steps is PowerShell 7.5 or later (the engine requires 7.5+).
+.DESCRIPTION
+ The GitHub-hosted Windows images ship PowerShell 7.4. If pwsh on PATH is older than 7.5, the pinned release below is
+ downloaded from the official PowerShell release page, its SHA-256 is checked against the value pinned here (the same value
+ appears in the hashes.sha256 asset of the release), it is extracted under RUNNER_TEMP and put first on PATH for the
+ following steps. A full extracted copy keeps pwsh.exe inside $PSHOME, which the engine needs to start its child processes.
+ It does not connect to a lab or use publication credentials.
+#>
+[CmdletBinding()]
+param(
+ [string]$Version = '7.5.13',
+ [string]$Sha256 = '120B8F0B04F3B3F6E8C351DDBE568BF596CDCA15EEB2ECB7E724060051A36D65'
+)
+
+Set-StrictMode -Version Latest
+$ErrorActionPreference = 'Stop'
+$minimum = [version]'7.5.0'
+
+function Get-PwshVersion {
+ $command = Get-Command pwsh -ErrorAction SilentlyContinue
+ if (-not $command) { return $null }
+ $text = & $command.Source -NoProfile -NonInteractive -Command '$PSVersionTable.PSVersion.ToString()'
+ if ($LASTEXITCODE -ne 0) { return $null }
+ return [version](($text | Select-Object -First 1) -replace '[-+].*$', '')
+}
+
+$current = Get-PwshVersion
+if ($current -and $current -ge $minimum) {
+ Write-Output ('pwsh {0} already satisfies PowerShell 7.5+.' -f $current)
+ return
+}
+
+$runnerTemp = if ($env:RUNNER_TEMP) { $env:RUNNER_TEMP } else { [IO.Path]::GetTempPath() }
+$zip = Join-Path $runnerTemp ('PowerShell-{0}-win-x64.zip' -f $Version)
+$destination = Join-Path $runnerTemp ('pwsh-{0}' -f $Version)
+$uri = 'https://github.com/PowerShell/PowerShell/releases/download/v{0}/PowerShell-{0}-win-x64.zip' -f $Version
+Invoke-WebRequest -Uri $uri -OutFile $zip -UseBasicParsing
+$actual = (Get-FileHash -LiteralPath $zip -Algorithm SHA256).Hash
+if (-not [string]::Equals($actual, $Sha256, [StringComparison]::OrdinalIgnoreCase)) {
+ Remove-Item -LiteralPath $zip -Force
+ throw "The downloaded PowerShell archive does not match the pinned SHA-256 ($actual)."
+}
+if (Test-Path -LiteralPath $destination) { throw "The destination already exists and will not be overwritten: $destination" }
+Expand-Archive -LiteralPath $zip -DestinationPath $destination
+if (-not (Test-Path -LiteralPath (Join-Path $destination 'pwsh.exe') -PathType Leaf)) { throw 'The archive does not contain pwsh.exe.' }
+if (-not $env:GITHUB_PATH) { throw 'The GitHub Actions path file is missing.' }
+$destination | Out-File -LiteralPath $env:GITHUB_PATH -Encoding utf8 -Append
+Write-Output ('PowerShell {0} extracted to {1} and added to PATH for the next steps.' -f $Version, $destination)
diff --git a/.github/scripts/Invoke-CI.ps1 b/.github/scripts/Invoke-CI.ps1
index 3c0bb71..fc5d169 100644
--- a/.github/scripts/Invoke-CI.ps1
+++ b/.github/scripts/Invoke-CI.ps1
@@ -1,4 +1,4 @@
-#Requires -Version 5.1
+#Requires -Version 7.5
[CmdletBinding()]
param(
[Parameter(Mandatory)][ValidateSet('Analyze', 'Test', 'Package')][string]$Stage,
@@ -8,11 +8,6 @@ param(
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
-if ($PSVersionTable.PSEdition -eq 'Desktop') {
- foreach ($name in 'Microsoft.PowerShell.Utility', 'Microsoft.PowerShell.Management', 'Microsoft.PowerShell.Security') {
- Import-Module (Join-Path $PSHOME ('Modules\{0}\{0}.psd1' -f $name)) -ErrorAction Stop
- }
-}
$root = [IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..\..'))
$configuration = Get-Content -LiteralPath (Join-Path $root '.github\ci.json') -Raw | ConvertFrom-Json
$OutputDirectory = [IO.Path]::GetFullPath($OutputDirectory)
@@ -39,11 +34,14 @@ switch ($Stage) {
$tracked = @(git -C $root ls-files -- '*.ps1' '*.psm1' '*.psd1')
if ($LASTEXITCODE -ne 0) { throw 'Cannot enumerate the tracked PowerShell sources.' }
$runtime = [string]$configuration.runtimeRoot
- $files = @($tracked | Where-Object {
+ $runtimeFiles = @($tracked | Where-Object {
($_ -notmatch '^(tests|tools|lib|\.github)/') -and
($runtime -eq '.' -or $_.StartsWith($runtime.TrimEnd('/') + '/', [StringComparison]::Ordinal))
})
- if ($files.Count -eq 0) { throw 'No tracked runtime PowerShell sources were found.' }
+ if ($runtimeFiles.Count -eq 0) { throw 'No tracked runtime PowerShell sources were found.' }
+ # Tests and tools are analysed too (advisory, same policy as the runtime); they are not part of the package.
+ $supportFiles = @($tracked | Where-Object { $_ -match '^(tests|tools)/' })
+ $files = @($runtimeFiles) + @($supportFiles)
$parseFailures = @()
$findings = @(foreach ($relative in $files) {
$path = Resolve-RepositoryFile $relative
@@ -57,7 +55,7 @@ switch ($Stage) {
}
foreach ($finding in @(Invoke-ScriptAnalyzer -Path $path -ErrorAction Stop)) {
[pscustomobject]@{
- File = $relative; Line = $finding.Line; Column = $finding.Column
+ File = $relative; Scope = $(if ($relative -in $runtimeFiles) { 'runtime' } else { 'tests-tools' }); Line = $finding.Line; Column = $finding.Column
Severity = [string]$finding.Severity; Rule = $finding.RuleName; Message = $finding.Message
}
}
@@ -67,7 +65,7 @@ switch ($Stage) {
ConvertTo-Json -InputObject $parseFailures -Depth 5 |
Out-File -LiteralPath (Join-Path $OutputDirectory 'syntax-errors.json') -Encoding utf8
$summary = [ordered]@{
- Files = $files.Count; Analyzer = '1.25.0'; SyntaxErrors = $parseFailures.Count
+ Files = $files.Count; RuntimeFiles = $runtimeFiles.Count; TestAndToolFiles = $supportFiles.Count; Analyzer = '1.25.0'; SyntaxErrors = $parseFailures.Count
Errors = @($findings | Where-Object Severity -eq 'Error').Count
Warnings = @($findings | Where-Object Severity -eq 'Warning').Count
Informative = @($findings | Where-Object Severity -eq 'Information').Count
@@ -76,15 +74,13 @@ switch ($Stage) {
$summary | ConvertTo-Json |
Out-File -LiteralPath (Join-Path $OutputDirectory 'analysis-summary.json') -Encoding utf8
Write-Output ($summary | ConvertTo-Json -Compress)
- if ($parseFailures.Count) { throw 'Runtime PowerShell sources contain syntax errors.' }
+ if ($parseFailures.Count) { throw 'PowerShell sources (runtime, tests or tools) contain syntax errors.' }
}
'Test' {
Import-Module Pester -RequiredVersion 6.1.0 -Force -ErrorAction Stop
if ($configuration.testMode -eq 'gate') {
$gate = Resolve-RepositoryFile $configuration.testEntry
- $executable = if ($PSVersionTable.PSEdition -eq 'Desktop') {
- Join-Path $PSHOME 'powershell.exe'
- } else { Join-Path $PSHOME 'pwsh.exe' }
+ $executable = Join-Path $PSHOME 'pwsh.exe'
& $executable -NoProfile -NonInteractive -File $gate
if ($LASTEXITCODE -ne 0) { throw "The existing project test gate failed with exit code $LASTEXITCODE." }
} elseif ($configuration.testMode -eq 'runner') {
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 83e288f..f3ee96b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -18,59 +18,51 @@ jobs:
validate:
name: Validate (${{ matrix.engine }})
runs-on: windows-2022
- timeout-minutes: 35
+ timeout-minutes: 75
strategy:
fail-fast: false
matrix:
- include: [{"engine":"Windows PowerShell 5.1","shell":"powershell","package":true}]
+ include: [{"engine":"PowerShell 7","shell":"pwsh","package":true}]
steps:
- name: Check out the tested revision
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
+ - name: Ensure PowerShell 7.5 or later (the engine requires it; the image ships 7.4)
+ shell: pwsh
+ run: .\.github\scripts\Install-PowerShell.ps1
+
+ - name: Show the PowerShell that runs the next steps
+ shell: pwsh
+ run: |
+ $PSVersionTable.PSVersion.ToString()
+ $PSHOME
+ if ($PSVersionTable.PSVersion -lt [version]'7.5.0') { throw 'PowerShell 7.5+ is required.' }
+
- name: Load pinned analysis and test modules
shell: pwsh
run: .\.github\scripts\Initialize-CIModules.ps1 -Destination "$env:RUNNER_TEMP\ci-modules"
- - name: Analyze PowerShell sources (PowerShell 7)
- if: matrix.shell == 'pwsh'
+ - name: Analyze PowerShell sources (PowerShell 7.5)
shell: pwsh
run: .\.github\scripts\Invoke-CI.ps1 -Stage Analyze -OutputDirectory "$env:RUNNER_TEMP\ci-results"
- - name: Analyze PowerShell sources (Windows PowerShell 5.1)
- if: matrix.shell == 'powershell'
- shell: powershell
- run: .\.github\scripts\Invoke-CI.ps1 -Stage Analyze -OutputDirectory "$env:RUNNER_TEMP\ci-results"
-
- - name: Run the existing project tests (PowerShell 7)
- if: matrix.shell == 'pwsh'
+ - name: Run the existing project tests (PowerShell 7.5)
shell: pwsh
run: .\.github\scripts\Invoke-CI.ps1 -Stage Test -OutputDirectory "$env:RUNNER_TEMP\ci-results"
- - name: Run the existing project tests (Windows PowerShell 5.1)
- if: matrix.shell == 'powershell'
- shell: powershell
- run: .\.github\scripts\Invoke-CI.ps1 -Stage Test -OutputDirectory "$env:RUNNER_TEMP\ci-results"
-
- - name: Build with the existing package tool (PowerShell 7)
- if: matrix.package && matrix.shell == 'pwsh'
+ - name: Build with the existing package tool (PowerShell 7.5)
shell: pwsh
run: .\.github\scripts\Invoke-CI.ps1 -Stage Package -OutputDirectory "$env:RUNNER_TEMP\ci-results"
- - name: Build with the existing package tool (Windows PowerShell 5.1)
- if: matrix.package && matrix.shell == 'powershell'
- shell: powershell
- run: .\.github\scripts\Invoke-CI.ps1 -Stage Package -OutputDirectory "$env:RUNNER_TEMP\ci-results"
-
- name: Retain public CI evidence
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
- name: ci-${{ matrix.engine }}
+ name: ci-powershell-7.5
path: |
${{ runner.temp }}/ci-results
- artifacts/pester-results.xml
tests/evidence/gate
if-no-files-found: error
retention-days: 7
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7fcd112..3a407de 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,45 +4,33 @@ All notable changes of PRA Remote Mailbox. Author: Nicolas Fabert. Versions foll
a MAJOR version changes the command line or the configuration file, a MINOR version adds a feature,
a PATCH version fixes a defect. The backup formats have their own version (see the guide, annex D).
-## 2.2.0 — Unreleased (source only; no tag, no release)
+## 3.0.0 — 2026-11-05
+
+**Breaking: PowerShell 7.5+ required.** Windows PowerShell 5.1 is refused before any code runs; use 2.x there.
+Backups, proofs and Finalize packages written by 2.x restore unchanged. Includes the unpublished 2.2.0 and 2.3.0 work.
### Added
-- **Signed-package integrity (Windows PowerShell 5.1).** `module\Test-PackageIntegrity.ps1` and the
- manifest `PackageIntegrity.psd1` verify, before any code runs, the owner's timestamped Authenticode
- signature (fixed thumbprint) of the verifier, the manifest and every PowerShell file, and the SHA256 of
- every stable file (modules, XAML, report template, sample CSV files, README, licence, guide, images).
- The entry script, each module and the GUI helper run the same bootstrap first. A changed, missing,
- duplicated, unexpected or reparse-point file fails closed; there is no unsigned mode or bypass.
- The configuration and the operational CSV lists in `config\` are data, outside the check, as are
- `Backups\`, `logs\` and `reports\`. A backup, log or report folder inside the package other than its own
- canonical `Backups`, `logs` or `reports` folder (a sub-folder is fine) is now refused before any file is
- written, judged on the physical location (a `\\?\` prefix, junction, SUBST drive, 8.3 name or `Documents and Settings` alias cannot hide the package; an unresolvable path is refused; external paths are unchanged): such files would be rejected at the next start.
- The final manifest is generated from the finalized signed and timestamped runtime bytes.
-- `tests\PackageIntegrity.Tests.ps1`: static inventory/bootstrap checks, a controlled fixture (only the
- signature call is substituted) for tamper, missing, unexpected, duplicate, manifest-schema and reparse
- cases, builder checks, and the native signed-package or unsigned fail-closed state of the real package.
-
-- **Report export snapshot.** The filtered CSV export in the report page now iterates a copy of the rows selected
- when it starts, so changing a filter while it runs cannot change the exported rows or the reported count.
-
-- **High-volume HTML report.** The report page no longer builds a table per row. The rows (22 fields),
- run errors and warnings are streamed by a Windows PowerShell 5.1 writer into dictionary-indexed,
- gzip+base64 chunks of at most 20,000 rows; the page decodes all chunks when it opens (eager, not lazy)
- and shows virtualized *Summary* and *All 22 fields* grids with at most 200 data rows in the page.
- Status/type/action/flag/text filters (AND, over every row), a search over the 22 fields, keyboard
- navigation, a details dialog, paged warnings and run errors, and a filtered CSV export of all matching
- rows (BOM, quoted, formulas neutralised). A current desktop Edge or Chrome is required
- (`DecompressionStream`); otherwise the page explains it and the CSV holds every row. Compression is not
- encryption. The server CSV is unchanged.
-- `tests\PraReport.Tests.ps1` with synthetic 50,000 and 100,000 row reports (exact counts, chunk
- boundaries, last row, escaping, fields) and `tests\ReportFixture.ps1`.
+- **Guided console** (`-Gui`, English): Setup, Task, Verify, Run, Next steps. Run-only settings that never rewrite
+ the configuration file, real step progress, and the journey of each mailbox.
+- **Transfer package** for two-server runs: one verified zip to carry to the other server (`-Batch
+ Get started · How it works · Convert and Recover · - Shared mailboxes · - WPF window · + Console · Reports · - Quick start · - Administrator guide + Requirements · + User guide · + Reference guide
> [!IMPORTANT] @@ -26,24 +27,119 @@ > > The `Install-Module` commands in this documentation use `-Force`, so they also update or reinstall a module that is already installed. If an older version still conflicts, close every PowerShell window, open a new one (as administrator for `-Scope AllUsers`), run `Uninstall-Module
+
+
+
+
+
+
+
+
+