chore(release): v2.6.1
fix: skip RoamedCredentials property set in Get-ADReplAccount -All so a single account with a malformed credential-roaming blob no longer aborts the whole password-quality replication (DSInternals ThrowIfNotEqual '%').
This commit is contained in:
@@ -6,6 +6,11 @@ Starting with **v2.2.0**, Elysium uses a **unified project version**. All script
|
||||
|
||||
---
|
||||
|
||||
## [2.6.1] — 2026-11-16
|
||||
|
||||
### Fixed
|
||||
- **`Test-WeakADPasswords` aborted on domains with malformed credential-roaming data:** DSInternals parses the credential-roaming blob (the `msPKI*` attributes written by legacy Certificate/Credential Roaming) strictly — the first byte must be `%` — and throws `System.ArgumentOutOfRangeException` ("Value must be equal to %") on any account whose roaming data is corrupt. `Get-ADReplAccount -All` returns a lazy enumerable, so that single bad account aborted the whole replication and no passwords were tested (surfaced as a DCSYNC diagnostic dump). The replication call now requests every account property set except `RoamedCredentials`, which password quality never uses, so the malformed blob is never parsed. No change to results. Falls back to a plain `-All` on DSInternals versions older than 7.x that lack the `-Properties` parameter.
|
||||
|
||||
## [2.6.0] — 2026-11-06
|
||||
|
||||
### Added
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
RootModule = 'Elysium.psm1'
|
||||
# Single source of the project version: the root scripts, User-Agent strings and the usage
|
||||
# beacon all read it from here.
|
||||
ModuleVersion = '2.6.0'
|
||||
ModuleVersion = '2.6.1'
|
||||
GUID = '01fbd208-0a80-42b4-b464-3be903feeb25'
|
||||
Author = 'CQRE.NET'
|
||||
CompanyName = 'CQRE.NET'
|
||||
|
||||
@@ -299,7 +299,22 @@ function Invoke-WeakPasswordTest {
|
||||
$resolvedHashFile = $null
|
||||
try {
|
||||
$resolvedHashFile = Resolve-DSInternalsWeakHashFile -Path $FilePath
|
||||
$accounts = Get-ADReplAccount -All -Server $selectedDomain["DC"] -Credential $credential
|
||||
|
||||
# Request all account properties EXCEPT RoamedCredentials. DSInternals parses the
|
||||
# credential-roaming blob (msPKI* attributes) strictly - the first byte must be '%' -
|
||||
# and throws ArgumentOutOfRangeException ("Value must be equal to %") on any account
|
||||
# whose legacy roaming data is malformed. Because Get-ADReplAccount -All yields a lazy
|
||||
# enumerable, that single bad account aborts the entire replication. Password quality
|
||||
# never uses roamed credentials, so dropping the property set makes the run robust with
|
||||
# no change to results. The -Properties parameter exists since DSInternals 7.x; fall
|
||||
# back to a plain -All on older modules that lack it.
|
||||
$replParams = @{ All = $true; Server = $selectedDomain["DC"]; Credential = $credential }
|
||||
if ((Get-Command Get-ADReplAccount).Parameters.ContainsKey('Properties')) {
|
||||
$allProps = [DSInternals.Common.Data.AccountPropertySets]::All
|
||||
$roamed = [DSInternals.Common.Data.AccountPropertySets]::RoamedCredentials
|
||||
$replParams['Properties'] = $allProps -band (-bnot $roamed)
|
||||
}
|
||||
$accounts = Get-ADReplAccount @replParams
|
||||
if ($CheckOnlyEnabledUsers) {
|
||||
Write-Verbose "Filtering to only enabled users per settings."
|
||||
# Prefer property 'Enabled' if present, fall back gracefully if not
|
||||
|
||||
Reference in New Issue
Block a user