v2.2.1: Critical multi-run session bugfix, .Count property fix, ASR prompt improvement, code quality review

This commit is contained in:
NexusOne23 2025-12-20 23:08:01 +01:00
parent c6f8291d50
commit b3efcf35fd
68 changed files with 307 additions and 159 deletions

View file

@ -2,7 +2,7 @@
# Module manifest for DNS module
RootModule = 'DNS.psm1'
ModuleVersion = '2.2.0'
ModuleVersion = '2.2.1'
GUID = 'a8f7b3c9-4e5d-4a2b-9c1d-8f3e5a7b9c2d'
Author = 'NexusOne23'
CompanyName = 'Open Source Project'

View file

@ -12,7 +12,7 @@
.NOTES
Author: NoID Privacy
Version: 2.2.0
Version: 2.2.1
Requires: PowerShell 5.1+, Administrator privileges
#>

View file

@ -128,7 +128,7 @@ function Restore-DNSSettings {
$keyContent = Get-ChildItem $dnsClientPath -ErrorAction SilentlyContinue
$keyProps = Get-ItemProperty $dnsClientPath -ErrorAction SilentlyContinue
# Count properties (exclude PS metadata like PSPath, etc.)
$propCount = ($keyProps.PSObject.Properties | Where-Object { $_.Name -notin @('PSPath','PSParentPath','PSChildName','PSDrive','PSProvider') }).Count
$propCount = @($keyProps.PSObject.Properties | Where-Object { $_.Name -notin @('PSPath','PSParentPath','PSChildName','PSDrive','PSProvider') }).Count
if (($null -eq $keyContent -or $keyContent.Count -eq 0) -and $propCount -eq 0) {
Remove-Item $dnsClientPath -Force -ErrorAction SilentlyContinue
@ -158,7 +158,7 @@ function Restore-DNSSettings {
if (Test-Path $dnsParamsPath) {
$keyContent = Get-ChildItem $dnsParamsPath -ErrorAction SilentlyContinue
$keyProps = Get-ItemProperty $dnsParamsPath -ErrorAction SilentlyContinue
$propCount = ($keyProps.PSObject.Properties | Where-Object { $_.Name -notin @('PSPath','PSParentPath','PSChildName','PSDrive','PSProvider') }).Count
$propCount = @($keyProps.PSObject.Properties | Where-Object { $_.Name -notin @('PSPath','PSParentPath','PSChildName','PSDrive','PSProvider') }).Count
if (($null -eq $keyContent -or $keyContent.Count -eq 0) -and $propCount -eq 0) {
Remove-Item $dnsParamsPath -Force -ErrorAction SilentlyContinue