Skip to content

Commit 8b5f3e7

Browse files
Pnwcomputersclaude
andcommitted
Release v2.6: speed test engine rewrite, GPU auto-download, false positive fixes
- Rewrote Test-NetworkSpeed as curl.exe (primary) -> BITS -> IWR cascade for native TLS 1.3 support; resolves systematic failures under Mullvad/VPN - Replaced retired speed.hetzner.de with speedtest.tele2.net/10MB.zip - Added PNWC ASCII startup banner with Clear-Host and version/contact header - Added Invoke-GPUToolDownload function for MSI Afterburner and FurMark - Batch: GPU Tools Manager Option 5 triggers automated tool downloads; moved all download logic to PS1 to fix delayed-expansion parser errors - Fixed WHEA false positive: Level 4 informational events now excluded - Fixed disk performance regex: split multiline .* into two separate matches - Fixed battery false positive on desktops: narrowed match to Battery colon space - Fixed Wi-Fi NIC false positive: added Wi-Fi/Wireless/WLAN to exclusion list - Fixed SMART: added Unhealthy to HealthStatus pattern - Fixed Windows Update: consolidated duplicate check blocks; added 1-5 branch - Updated README and CHANGELOG for v2.6 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 3b2a4b5 commit 8b5f3e7

4 files changed

Lines changed: 1658 additions & 872 deletions

File tree

CHANGELOG.md

Lines changed: 189 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -5,83 +5,196 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
** Update 9-2-2025 **
9-
** 🔧 General Improvements **
10-
- Improved visual formatting using consistent separators (-------------------------------------) and color-coded headers.
11-
- Run As Administrator Check/Approval for BAT file execution
12-
13-
** 🧠 Expanded Diagnostics **
14-
New Diagnostic Modules Added:
15-
- Test-OSHealth: Runs DISM and SFC scans for OS integrity.
16-
- Test-StorageSMART: Collects SMART and reliability data from physical disks.
17-
- Test-Trim: Checks SSD TRIM status.
18-
- Test-NIC: Captures active network adapter details.
19-
- Test-GPU: Summarizes GPU and DirectX info via dxdiag.
20-
- Test-Power: Reports battery status and generates an energy report.
21-
- Test-HardwareEvents: Scans for WHEA hardware error logs.
22-
23-
** Expanded Toolset: **
24-
Added support for additional Sysinternals tools: sigcheck.exe, contig.exe, diskext.exe, listdlls.exe, clockres.exe.
25-
- 🎨 Enhanced Console Output
26-
- Color-coded console feedback:
27-
- ✅ Success: Green
28-
- ⚠️ Warning: Yellow
29-
- ❌ Failure: Red
30-
Recommendations are now printed with color-coded Write-Host output based on severity.
31-
32-
** 📊 Improved Reporting **
33-
Executive Summary includes:
34-
- Total tests run
35-
- Success/failure counts
36-
- Success rate (%)
37-
- Total test duration
38-
39-
Detailed Results:
40-
- Cleaned and truncated tool output for readability.
41-
- Limited to first 15 lines per tool to avoid clutter.
42-
43-
Recommendations Section:
44-
- Dynamically generated based on test outcomes.
45-
- Includes memory, CPU, disk, SMART, TRIM, and WHEA insights.
46-
47-
Report Statistics:
48-
- Displays file sizes and compression ratio between clean and detailed reports.
49-
50-
** 🧭 User Experience Enhancements **
51-
Interactive Menu:
52-
- Expanded to 17 options including new diagnostics and report generation.
53-
- Clear prompts and color-coded choices for better navigation.
54-
55-
AutoRun Support:
56-
- Automatically runs all tests and generates reports when -AutoRun is used.
57-
58-
Error Handling:
59-
- Improved error messages with line number references.
60-
- Graceful fallback for missing tools or failed tests.
61-
62-
** 🔧 Batch File Changes Made: **
63-
Elevation Logic Overhaul:
64-
- Replaced net session check with SID-based elevation detection (S-1-5-32-544) for better reliability on systems where the Server service is disabled.
65-
66-
Elevation Flag Handling:
67-
- Added /elevated flag to prevent infinite loops and provide clearer error messaging when elevation fails or is cancelled.
68-
69-
PowerShell Script Selection:
70-
- Added logic to prefer SystemTester_device_grouped.ps1 if available, falling back to SystemTester.ps1.
71-
72-
** New Execution Modes **
73-
- Option 2: Classic test sequence
74-
- Option 3: Grouped-by-device test sequence (-AutoRunByDevice)
75-
- Execution Policy Fix Enhancement
76-
- Improved Option 4 to set RemoteSigned for CurrentUser without triggering additional UAC prompts.
77-
78-
Help Section Updates:
79-
- Clarified troubleshooting steps and added notes on new test modes.
80-
81-
General Cleanup
82-
- Removed redundant title/color lines, improved messaging consistency, and ensured popd is used on exit to restore working directory.
8+
---
839

8410
## [Unreleased]
11+
8512
### Planned
86-
- Network deployment options or network log storing
13+
- HTML report export with charts and graphs
14+
- Baseline comparison mode (compare current vs. previous test run)
15+
- Skip flags (`-SkipCPU`, `-SkipNetwork`, etc.) for targeted testing
16+
- CSV export for data analysis
17+
- Memory leak detection module
18+
- Audio device testing
19+
- Intel Arc GPU support
20+
- Network deployment options / centralized log storage
8721
- Multi-language support
22+
23+
---
24+
25+
## [2.6] - 2026-06-22
26+
27+
### 🚀 Added
28+
- **PNWC Startup Banner**: Branded ASCII art header (`###### ## ## ## ## ######`) painted on launch with `Clear-Host` first to eliminate PowerShell startup noise. Shows version, contact, capability summary, timestamp, computer name, and drive. Pure 7-bit ASCII — no UTF-8 box characters that mangle on cp1252 console hosts.
29+
- **`Invoke-GPUToolDownload` function**: New PS1 function handles automated download of MSI Afterburner and FurMark via curl.exe → BITS → IWR cascade with minimum file-size validation. Accepts `-DownloadGPUTool` and `-DownloadDir` script parameters so the batch launcher can invoke it cleanly via `-File` mode.
30+
- **Batch: GPU Tools Manager Option 5 — Download GPU Tools Automatically**: Auto-downloads MSI Afterburner (MSI CDN) and FurMark (Geeks3D) directly to the `Tools\` folder without opening a browser. Old Option 5 (Return) moved to Option 6.
31+
32+
### 🔧 Fixed
33+
- **Network Speed Test — full engine rewrite**: Replaced single-method `Invoke-WebRequest` approach with a three-method cascade: **curl.exe** (primary, WinHTTP/Schannel, native TLS 1.3) → **BITS** (fallback, also WinHTTP) → **Invoke-WebRequest** (last resort with TLS workarounds). Resolves systematic handshake failures on Cloudflare and OVH under Mullvad VPN and similar environments where `.NET ServicePointManager` bypass fires too late in the TLS stack.
34+
- **Network Speed Test — dead URL**: Replaced `speed.hetzner.de` (hostname retired, DNS failure on all systems) with `speedtest.tele2.net/10MB.zip` in the HTTP fallback slot.
35+
- **Network Speed Test — TLS negotiation**: Enabled TLS 1.2/1.3 additively before each IWR attempt with per-protocol fallback, restored afterward. Prevents silent failures on PowerShell 5.1 systems that default to TLS 1.0/1.1.
36+
- **Network Speed Test — PowerShell 7+ cert bypass**: Added `-SkipCertificateCheck` for PowerShell 7+ where `Invoke-WebRequest` uses `HttpClient` and ignores `ServicePointManager` callbacks.
37+
- **Network Speed Test — status reporting**: Reset `$status` to `SUCCESS` on a successful download so an earlier `Get-NetAdapter` failure no longer mislabels a working speed test as `FAILED`.
38+
- **Batch Launcher — GPU download parser errors**: `setlocal enabledelayedexpansion` caused `!` characters in inline PowerShell strings (e.g. `heat!`) to be consumed by cmd.exe before PowerShell received the script, producing `Missing closing '}'`, `The Try statement is missing its Catch or Finally block`, and `Unexpected token ')'`. Fixed by moving all download logic into `Invoke-GPUToolDownload` in the PS1; batch now calls `-File "%SCRIPT_PS1%" -DownloadGPUTool "..." -DownloadDir "..."`.
39+
- **WHEA false positive**: Level 4 informational events from `Microsoft-Windows-WHEA-Logger` — including "WHEA has started" (Event ID 1) which fires on every Windows boot — triggered "Hardware errors detected" on all healthy systems. Added `Where-Object { $_.Level -le 3 }` to restrict to Warning/Error/Critical only.
40+
- **Disk performance — silent regex failure**: `"Write: ([\d\.]+) MB/s.*Read: ([\d\.]+) MB/s"` used `.*` which cannot cross newlines in PowerShell `-match`. Write and Read speeds are stored on separate output lines, so the regex never matched on any system and disk performance recommendations never fired. Split into two independent `if (-match)` blocks.
41+
- **Battery false positive on desktops**: `$powerInfo.Output -match "Battery"` matched the string `"No battery (desktop)"` emitted by desktop systems. Changed to `"Battery: "` (colon + space) which only matches actual battery data lines.
42+
- **Wi-Fi NIC false positive**: 802.11n adapters at 100 Mbps incorrectly triggered "Physical network adapter running at 10/100 Mbps — Upgrade to Gigabit Ethernet." Added `Wi-Fi|Wireless|WLAN` to the adapter line exclusion pattern.
43+
- **SMART detection — missing status**: `"Unhealthy"` `HealthStatus` from `Get-PhysicalDisk` was absent from the recommendations pattern match. Added alongside `Warning|Caution|Failed|Degraded`.
44+
- **Windows Update — duplicate recommendations**: Two separate check blocks both fired `"ACTION: N Windows update(s)"` for any `pendingCount > 0`. Removed the early duplicate block; all Windows Update recommendations consolidated into a single block.
45+
- **Windows Update — 1–5 pending gap**: Removing the early duplicate left systems with 1–5 pending updates producing no recommendation. Added `elseif ($pendingCount -gt 0)` branch to the consolidated block covering the full range: `>20` WARNING, `>5` INFO, `>0` ACTION, `0` GOOD.
46+
- **GPU VRAM detection — REG_BINARY crash**: `Get-AccurateVRAM` silently fell back to the WMI 4 GB cap when `HardwareInformation.qwMemorySize` was stored as `REG_BINARY` (byte array) instead of `REG_QWORD`. Direct `[int64]` cast threw and was swallowed by bare `catch {}`. Now detects the registry type and converts via `[System.BitConverter]::ToInt64()`.
47+
- **GPU memory — dangling cross-reference**: On multi-GPU systems without available performance counters, per-adapter entries pointed to a "GPU-Memory-Total" aggregate section that was never written (its guard required both `$gpuCount -gt 1` AND `$countersAvailable`). Cross-reference now only appears when the aggregate section will actually be present.
48+
- **Disk performance — exception not recorded**: A disk test exception (`%TEMP%` write denied, out of disk space, etc.) printed a console warning but wrote nothing to `$TestResults`, making the failure invisible in the report and excluded from pass/fail counts. Catch block now records `Status="FAILED"`.
49+
- **OS Health — DISM error coverage restored**: A prior false-positive fix removed `"error"` from the recommendations regex, inadvertently dropping `"DISM encountered an error"`. Restored via `"DISM encountered|could not perform the requested operation"`.
50+
- **OS Health — false-positive guard**: Added `"No integrity violations"` to the `-notmatch` exclusion list to prevent false corruption warning from DISM `/CheckHealth` output on clean systems.
51+
- **OS Health — non-English Windows**: DISM and SFC output is localized; English phrase matching silently produced false-healthy results on non-English corrupt systems. DISM exit code (0 = clean, 11 = repairable, other = error) now captured and embedded as a language-neutral signal.
52+
- **Windows Update — search failure unhandled**: A running-but-broken WU service caused the COM search call to throw, writing "Search failed: ..." to output but triggering no recommendation. A WARNING recommendation is now emitted when search failure is detected.
53+
- **NVIDIA SMI — exit code ignored**: Both `nvidia-smi` invocations stored `Status="SUCCESS"` unconditionally. GPU driver errors (driver not loaded, device unavailable) were silently recorded as passing. Exit code is now checked and mapped correctly.
54+
55+
### 📈 Changed
56+
- GPU Tools Manager sub-menu renumbered: old Option 5 (Return to Main Menu) is now Option 6; new Option 5 is Download GPU Tools Automatically.
57+
- Startup banner replaces simple 4-line version header; `Clear-Host` precedes the banner to eliminate PowerShell startup noise.
58+
59+
---
60+
61+
## [2.5] - 2026-05-01
62+
63+
### 🚀 Added
64+
- **TLS 1.3 Support**: Rewrote download engine to support modern TLS 1.3/1.2 protocols via bitwise OR mask, preventing "Connection Closed" errors on Microsoft CDNs.
65+
- **Enhanced GPU Reporting**: Implemented registry-level VRAM detection to bypass the 4GB WMI truncation bug; now accurately reports high-end cards (e.g., RTX 5070 12GB).
66+
- **Multi-GPU Intelligence**: Added system-wide GPU memory aggregation for machines with both iGPU and discrete graphics.
67+
- **Expanded NIC Filtering**: Added ZeroTier, AnyConnect, GlobalProtect, Fortinet, and more to the virtual adapter exclusion list.
68+
69+
### 🔧 Fixed
70+
- **Launcher Awareness**: Fixed a critical bug where the script failed to detect the .bat launcher on PowerShell 5.1.
71+
- **Network Speed Logic**: Switched Mbps calculations to base-10 to match ISP reporting and added a 1MB sanity floor to prevent false "slow internet" warnings from error pages.
72+
- **Storage Diagnostics**: Rewrote disk performance tests to use `WriteThrough` flags, ensuring real disk throughput is measured rather than system cache.
73+
- **Recommendation Engine**: Refined regex logic to eliminate false positives for "System Corruption" and "Windows Update Stopped" (now checks StartType).
74+
- **Security**: Implemented `try/finally` blocks to ensure system SSL certificate callbacks are always restored to default state after testing.
75+
76+
### 📈 Changed
77+
- Updated Sysinternals Suite size estimate to ~170MB.
78+
- Increased download timeout to 180s to accommodate larger payloads on slower links.
79+
- "EXCELLENT" status now only triggers if zero warnings/critical issues are found by the engine.
80+
81+
---
82+
83+
## [2.4.0] - 2026-04-23
84+
85+
### Fixed
86+
87+
**Network — Latency Test**
88+
- `$targetPort` was never defined, causing `Test-NetConnection` to receive `Port=0` and throw a
89+
validation error on every run — latency test now correctly runs as ICMP-only with no port argument
90+
- `Test-NetConnection -InformationLevel Detailed` removed; it requires a valid port and is
91+
unnecessary for basic ping latency measurement
92+
- `PsPing` was called with `IP:Port` format instead of bare IP for ICMP mode
93+
- `PsPing` result regex was too strict — minor whitespace variations in output caused results to be
94+
silently dropped; regex now uses flexible `\s*` matching
95+
- Added debug output line showing raw PsPing tail when parsing still fails, making future
96+
diagnosis possible without re-running the test
97+
98+
**Network — Speed Test**
99+
- Single hardcoded Hetzner HTTPS URL failed under VPN/proxy TLS interception (Mullvad, Tailscale,
100+
corporate proxies) with no fallback — replaced with a 3-URL chain: Cloudflare, Hetzner HTTP, OVH
101+
- Added per-attempt SSL certificate validation bypass to handle MITM interception; bypass is
102+
scoped to the request and restored immediately after each attempt regardless of success or failure
103+
- Added minimum file size check (1000 bytes) to prevent a firewall error page from being recorded
104+
as a successful download result
105+
106+
**Network — Recommendations**
107+
- Virtual and VPN adapters (VMware VMnet, Hyper-V vEthernet, Tailscale, Mullvad, WireGuard,
108+
TAP-Windows, OpenVPN) were incorrectly flagged as "slow physical NICs" at 100 Mbps
109+
- Recommendation engine now iterates adapter lines individually and excludes known virtual/VPN
110+
adapter name patterns before applying the slow-speed check
111+
112+
**Reports — Output Location**
113+
- Reports were saving to the script root directory; now saved to a `Reports\` subfolder
114+
- `Reports\` folder is created automatically on first report generation
115+
- Energy report (`powercfg /energy`) redirected into `Reports\` alongside text reports
116+
- Write-access test updated to target `Reports\` folder; error messages now include the specific
117+
path that failed
118+
119+
**Reports — Encoding**
120+
- Report files written as UTF-8 caused Unicode bullets (``) and arrows (``) to render as
121+
mojibake (`• â†'`) in Notepad and legacy text viewers
122+
- Switched `Out-File` encoding from UTF8 to ASCII throughout report generation
123+
- Replaced all Unicode bullet (``) characters with `*` and arrow (``) characters with `->`
124+
- Removed Unicode box-drawing characters (`└─`) from PowerShell menu display strings
125+
- Script file is now fully 7-bit ASCII — no encoding surprises in any editor or viewer
126+
127+
**Batch Launcher**
128+
- Sysinternals Suite auto-download used a single HTTPS URL with no SSL bypass — same VPN/proxy
129+
TLS interception issue as the PS1 speed test; same fix applied
130+
- `VERIFY` section exit-code branching silently swallowed function output, producing misleading
131+
success messages regardless of actual result; simplified to direct output display
132+
- Stale reference to legacy `SystemTester_FIXED.ps1` filename removed from error message
133+
- EXIT screen updated to show correct `Reports\` subfolder path
134+
135+
---
136+
137+
## [2.21.0] - 2025-09-02
138+
139+
### Added
140+
- Tool integrity verification with digital signature checking for all Sysinternals executables
141+
- Dual report system: timestamped Clean Summary and Detailed output saved as separate `.txt` files
142+
- Batch launcher (`SystemTester.bat`) with reliable admin elevation and interactive menu
143+
- GPU Tools Manager — batch menu option 6 for managing NVIDIA, AMD, and GPU-Z testing utilities
144+
- Enhanced GPU testing: multi-GPU support, NVIDIA-SMI integration, AMD driver detection via registry
145+
- DirectX diagnostics via `dxdiag`, OpenGL registry check, hardware-accelerated GPU scheduling detection
146+
- Windows Update integration — checks pending updates, lists titles and classifications, reports service status
147+
- WHEA hardware event log scan covering last 7 days
148+
- Network speed and latency testing (initial implementation: `Test-NetConnection`, `PsPing`)
149+
- Launcher awareness detection — script detects if launched via batch file for context-aware messages
150+
- `Test-OSHealth` — runs DISM `/ScanHealth` and SFC for OS integrity (admin only)
151+
- `Test-StorageSMART` — collects health status and media type from physical disks
152+
- `Test-Trim` — checks SSD TRIM enablement status via `fsutil`
153+
- `Test-NIC` — captures active network adapter details including link speed and MAC address
154+
- `Test-GPU` — GPU and display configuration with DirectX and OpenGL information
155+
- `Test-Power` — battery status and `powercfg /energy` report generation (admin only)
156+
- `Test-HardwareEvents` — WHEA error log scan
157+
- Support for additional Sysinternals tools: `sigcheck`, `contig`, `diskext`, `listdlls`, `clockres`
158+
- `-AutoRun` parameter for unattended full-suite execution with automatic report generation
159+
- Color-coded console output (green/yellow/red) for all test results and recommendations
160+
- Recommendations engine — dynamically generated findings covering memory, CPU, disk, SMART,
161+
TRIM, network, GPU drivers, Windows Update, and WHEA events
162+
- GPU sub-menu options: `12a` (basic info), `12b` (vendor-specific), `12c` (GPU memory)
163+
- GPU-Z download assistant with file size validation in batch launcher
164+
165+
### Fixed
166+
- Memory usage calculation: `FreePhysicalMemory` (reported in KB) was not being converted
167+
correctly, causing inflated usage percentages
168+
169+
### Changed
170+
- Admin elevation method replaced: `net session` check swapped for PowerShell
171+
`WindowsPrincipal.IsInRole` with `FLTMC` as fallback — more reliable on systems where the
172+
Server service is disabled
173+
- Interactive menu expanded to 18 options
174+
- Report executive summary now includes total tests, success/failure counts, success rate, and duration
175+
- Detailed report output cleaned and limited to first 40 lines per tool to reduce file size
176+
177+
---
178+
179+
## [2.0.0] - 2024-11-01
180+
181+
### Added
182+
- Complete rewrite with modular function structure
183+
- Interactive menu system with numbered options
184+
- Recommendations engine (initial version)
185+
- Improved report formatting with section headers
186+
187+
### Changed
188+
- Monolithic script refactored into discrete test functions
189+
- All WMI calls migrated to CIM instances for better performance and PowerShell 7 compatibility
190+
191+
---
192+
193+
## [1.0.0] - 2024-01-01
194+
195+
### Added
196+
- Initial release
197+
- Core Sysinternals tool runner: `psinfo`, `coreinfo`, `pslist`, `handle`, `clockres`, `autorunsc`, `du`
198+
- Basic system information collection (OS, CPU, RAM, storage)
199+
- Single text report output
200+
- Manual Sysinternals installation required

0 commit comments

Comments
 (0)