diff --git a/CHANGELOG.md b/CHANGELOG.md index e41a833..f1accea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ Starting with **v2.2.0**, Elysium uses a **unified project version**. All script - `Test-WeakADPasswords.ps1` did not relaunch under Windows PowerShell like `Extract-NTHashes.ps1` does, so a direct run under `pwsh` loaded DSInternals through `-UseWindowsPowerShell` implicit remoting, which returns deserialized objects. It also set the PSGallery repository to `Trusted` on the host as a side effect of installing DSInternals; that is removed (`-Force` on the install already covers the prompt). - `Update-LithnetStore.ps1` ignored `InstallationPath`/`WeakPasswordsDatabase` and always looked for `khdb.txt` next to the script; it now resolves the same KHDB path as the other scripts. It also writes a transcript to `Reports/logs/` like the other operational scripts and uses the shared settings parser instead of its own copy. - The `Restart-WithPwshIfAvailable` / `Restart-WithWindowsPowerShellIfAvailable` relaunchers in `Elysium.Common.ps1` relaunched `Elysium.Common.ps1` itself instead of the calling script (`$PSCommandPath` inside a function is the file that defines it), then exited. Whenever a relaunch fired, the script silently did nothing: `Update-KHDB.ps1`, `Prepare-KHDBStorage.ps1`, `Update-LithnetStore.ps1` and `Uninstall.ps1` started from Windows PowerShell on a host with `pwsh` installed (including menu options 1, 4 and 5), and `Extract-NTHashes.ps1` / `Test-WeakADPasswords.ps1` started directly from `pwsh`. They now relaunch the calling script with its parameters. +- `Update-KHDB.ps1 -MaxParallelTransfers N`, as documented in the README, was silently ignored: the script had no `param()` block, so the value never reached the downloader and PowerShell 7 always used 5 concurrent transfers. The script now declares and forwards the parameter (values outside 1-64 are rejected). ## [2.4.6] — 2026-07-29 diff --git a/Update-KHDB.ps1 b/Update-KHDB.ps1 index c72950d..297d096 100644 --- a/Update-KHDB.ps1 +++ b/Update-KHDB.ps1 @@ -18,8 +18,17 @@ Known-hashes database updater for the Elysium AD password testing tool. Downloads a sharded KHDB manifest, performs incremental shard updates, validates checksums, and atomically refreshes the merged khdb.txt for downstream scripts. Supports Azure Blob Storage (via SAS) and S3-compatible endpoints (SigV4). + +.PARAMETER MaxParallelTransfers +Concurrent shard downloads on PowerShell 7+ (default 5). #> +[CmdletBinding()] +param( + [ValidateRange(1, 64)] + [int]$MaxParallelTransfers = 5 +) + $ErrorActionPreference = 'Stop' Set-StrictMode -Version Latest @@ -798,5 +807,5 @@ function Update-KHDB { } } -Update-KHDB +Update-KHDB @PSBoundParameters Write-Host "Script execution completed."