2 Commits

Author SHA1 Message Date
tomas.kracmar 6b2ae6c8b5 Release v2.3.0: add DSInternals version check and auto-update
Test-WeakADPasswords.ps1 now validates the installed DSInternals
version at startup:
- v6.2 (unsigned) warns that native DLLs are blocked and replication
  will fail; directs operator to Update-Module DSInternals.
- Below v7.0 prompts to auto-update via Update-Module -Force and
  exits cleanly so the new version is loaded on re-run.
- v7.0+ passes silently.

All versions bumped to unified v2.3.0.
2026-06-09 13:16:47 +02:00
tomas.kracmar 37d1a8d971 Release v2.2.5: resolve DSInternals module path in block error
The Zone.Identifier block detection now dynamically resolves the
actual DSInternals module installation path via Get-Module instead
of hardcoding a ProgramFiles path, so the Unblock-File command in
the error message is always correct.

All versions bumped to unified v2.2.5.
2026-06-09 13:10:36 +02:00
11 changed files with 51 additions and 11 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
################################################## ##################################################
## Project: Elysium ## ## Project: Elysium ##
## File: Bump-Version.ps1 ## ## File: Bump-Version.ps1 ##
## Version: 2.2.4 ## ## Version: 2.3.0 ##
## Support: support@cqre.net ## ## Support: support@cqre.net ##
################################################## ##################################################
+17
View File
@@ -6,6 +6,23 @@ Starting with **v2.2.0**, Elysium uses a **unified project version**. All script
--- ---
## [2.3.0] — 2026-06-09
### Added
- `Test-WeakADPasswords.ps1` now checks the installed DSInternals version at startup:
- **v6.2** (unsigned) is flagged with a warning explaining that unsigned native DLLs are blocked and replication will fail. Remediation: `Update-Module DSInternals`.
- **Below v7.0** triggers an interactive prompt offering to run `Update-Module DSInternals -Force` automatically. If accepted, the script updates the module and exits cleanly so the operator can re-run with the new version loaded.
- v7.0+ is required because it fixes intermittent CRC errors mid-replication and `Test-PasswordQuality` result truncation bugs.
---
## [2.2.5] — 2026-06-09
### Fixed
- The DSInternals `Zone.Identifier` block error message (added in v2.2.4) now dynamically resolves the actual DSInternals module path via `Get-Module` instead of hardcoding `$env:ProgramFiles\WindowsPowerShell\DSInternals`. The `Unblock-File` command in the error now points to the correct installation directory.
---
## [2.2.4] — 2026-06-09 ## [2.2.4] — 2026-06-09
### Fixed ### Fixed
+1 -1
View File
@@ -1,4 +1,4 @@
$script:ElysiumVersion = '2.2.4' $script:ElysiumVersion = '2.3.0'
function Invoke-RestartWithExecutable { function Invoke-RestartWithExecutable {
param( param(
+1 -1
View File
@@ -7,7 +7,7 @@
################################################## ##################################################
## Project: Elysium ## ## Project: Elysium ##
## File: Elysium.ps1 ## ## File: Elysium.ps1 ##
## Version: 2.2.4 ## ## Version: 2.3.0 ##
## Support: support@cqre.net ## ## Support: support@cqre.net ##
################################################## ##################################################
+1 -1
View File
@@ -8,7 +8,7 @@
################################################## ##################################################
## Project: Elysium ## ## Project: Elysium ##
## File: ElysiumSettings.txt ## ## File: ElysiumSettings.txt ##
## Version: 2.2.4 ## ## Version: 2.3.0 ##
## Support: support@cqre.net ## ## Support: support@cqre.net ##
################################################## ##################################################
+1 -1
View File
@@ -7,7 +7,7 @@
################################################## ##################################################
## Project: Elysium ## ## Project: Elysium ##
## File: Extract-NTHashes.ps1 ## ## File: Extract-NTHashes.ps1 ##
## Version: 2.2.4 ## ## Version: 2.3.0 ##
## Support: support@cqre.net ## ## Support: support@cqre.net ##
################################################## ##################################################
+1 -1
View File
@@ -7,7 +7,7 @@
################################################## ##################################################
## Project: Elysium ## ## Project: Elysium ##
## File: Prepare-KHDBStorage.ps1 ## ## File: Prepare-KHDBStorage.ps1 ##
## Version: 2.2.4 ## ## Version: 2.3.0 ##
## Support: support@cqre.net ## ## Support: support@cqre.net ##
################################################## ##################################################
+25 -2
View File
@@ -8,7 +8,7 @@
################################################## ##################################################
## Project: Elysium ## ## Project: Elysium ##
## File: Test-WeakADPasswords.ps1 ## ## File: Test-WeakADPasswords.ps1 ##
## Version: 2.2.4 ## ## Version: 2.3.0 ##
## Support: support@cqre.net ## ## Support: support@cqre.net ##
################################################## ##################################################
@@ -354,7 +354,10 @@ function Import-CompatModule {
if ($nonFipsErrors.Count -gt 0) { if ($nonFipsErrors.Count -gt 0) {
$nonFipsMsg = $nonFipsErrors[0].Exception.Message $nonFipsMsg = $nonFipsErrors[0].Exception.Message
if ($nonFipsMsg -match 'Zone\.Identifier|alternate data stream') { if ($nonFipsMsg -match 'Zone\.Identifier|alternate data stream') {
throw ("DSInternals native DLL is blocked by Windows (Zone.Identifier). Run the following on the target machine and retry:`n Get-ChildItem -Path '$env:ProgramFiles\WindowsPowerShell\DSInternals' -Recurse | Unblock-File") $dsModule = Get-Module -Name DSInternals -ErrorAction SilentlyContinue
if (-not $dsModule) { $dsModule = Get-Module -ListAvailable -Name DSInternals -ErrorAction SilentlyContinue | Select-Object -First 1 }
$dsPath = if ($dsModule) { $dsModule.ModuleBase } else { '<DSInternals module path>' }
throw ("DSInternals native DLL is blocked by Windows (Zone.Identifier). Run the following on the target machine and retry:`n Get-ChildItem -Path '$dsPath' -Recurse | Unblock-File")
} }
Write-Warning ("DSInternals import reported non-fatal warning(s): {0}" -f $nonFipsMsg) Write-Warning ("DSInternals import reported non-fatal warning(s): {0}" -f $nonFipsMsg)
} }
@@ -389,6 +392,26 @@ try {
} }
} }
# Version check: v6.2 was unsigned (blocks native DLLs, causes replication failures);
# v7.0 fixes intermittent CRC errors mid-replication and Test-PasswordQuality result truncation.
$dsInternalsVersion = (Get-Module -Name DSInternals).Version
$minimumVersion = [version]'7.0'
$unsignedVersion = [version]'6.2'
if ($dsInternalsVersion -eq $unsignedVersion) {
Write-Warning ("DSInternals {0} is not digitally signed, which blocks its native DLLs and causes replication failures. Update to v7.0+: Update-Module DSInternals" -f $dsInternalsVersion)
} elseif ($dsInternalsVersion -lt $minimumVersion) {
$resp = Read-Host ("DSInternals {0} is installed; v7.0 fixes intermittent replication CRC errors and result truncation. Update now? [Y/N]" -f $dsInternalsVersion)
if ($resp -match '^(?i:y|yes)$') {
try {
Update-Module -Name DSInternals -Force -ErrorAction Stop
Write-Host '[+] DSInternals updated. Please re-run the script to load the new version.'
exit 0
} catch {
Write-Warning ("DSInternals update failed: {0}" -f $_.Exception.Message)
}
}
}
# Resolve KHDB path with fallbacks # Resolve KHDB path with fallbacks
$installationPath = $ElysiumSettings["InstallationPath"] $installationPath = $ElysiumSettings["InstallationPath"]
if ([string]::IsNullOrWhiteSpace($installationPath)) { $installationPath = $scriptRoot } if ([string]::IsNullOrWhiteSpace($installationPath)) { $installationPath = $scriptRoot }
+1 -1
View File
@@ -7,7 +7,7 @@
################################################## ##################################################
## Project: Elysium ## ## Project: Elysium ##
## File: Uninstall.ps1 ## ## File: Uninstall.ps1 ##
## Version: 2.2.4 ## ## Version: 2.3.0 ##
## Support: support@cqre.net ## ## Support: support@cqre.net ##
################################################## ##################################################
+1 -1
View File
@@ -7,7 +7,7 @@
################################################## ##################################################
## Project: Elysium ## ## Project: Elysium ##
## File: Update-KHDB.ps1 ## ## File: Update-KHDB.ps1 ##
## Version: 2.2.4 ## ## Version: 2.3.0 ##
## Support: support@cqre.net ## ## Support: support@cqre.net ##
################################################## ##################################################
+1 -1
View File
@@ -7,7 +7,7 @@
################################################## ##################################################
## Project: Elysium ## ## Project: Elysium ##
## File: Update-LithnetStore.ps1 ## ## File: Update-LithnetStore.ps1 ##
## Version: 2.2.4 ## ## Version: 2.3.0 ##
## Support: support@cqre.net ## ## Support: support@cqre.net ##
################################################## ##################################################