Skip to content

Commit cc3b537

Browse files
Pnwcomputersclaude
andcommitted
Fix output cleaner and tool invocation bugs found in v2.6 test run
- Add clockres and du to -accepteula list; both were dumping full EULA text into report output instead of actual clock/disk data - Add NativeCommandError/CategoryInfo/FullyQualifiedErrorId filter to Convert-ToolOutput so 2>&1 stderr captures don't leak PS error formatting into tool output sections - Fix autorunsc argument bug: -a consumed -c as its selection type (codecs only), leaving no CSV flag and triggering usage help text; changed to -c only (default logon entries, CSV format) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 8b5f3e7 commit cc3b537

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

SystemTester.ps1

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,10 @@ function Convert-ToolOutput {
270270
$cleaned = @()
271271

272272
foreach ($line in $lines) {
273-
# Skip boilerplate
273+
# Skip boilerplate and PowerShell error formatting from 2>&1 stderr capture
274274
if ($line -match "Copyright|Sysinternals|www\.|EULA|Mark Russinovich|David Solomon|Bryce Cogswell") { continue }
275275
if ($line -match "^-+$|^=+$|^\*+$") { continue }
276+
if ($line -match "NativeCommandError|CategoryInfo|FullyQualifiedErrorId|RemoteException|At .*\.ps1:\d+|^\+\s") { continue }
276277

277278
# Tool-specific filtering
278279
switch ($ToolName) {
@@ -328,7 +329,7 @@ function Invoke-Tool {
328329
Write-Host "Running $ToolName..." -ForegroundColor Cyan
329330
try {
330331
$start = Get-Date
331-
if ($ToolName -in @("psinfo","pslist","handle","autorunsc","testlimit","contig")) {
332+
if ($ToolName -in @("psinfo","pslist","handle","autorunsc","testlimit","contig","clockres","du")) {
332333
$ArgumentList = "-accepteula $ArgumentList"
333334
}
334335

@@ -571,7 +572,7 @@ function Test-Processes {
571572
# Test: Security
572573
function Test-Security {
573574
Write-Host "`n=== Security Analysis ===" -ForegroundColor Green
574-
Invoke-Tool -ToolName "autorunsc" -ArgumentList "-a -c" -Description "Autorun entries" -RequiresAdmin $true
575+
Invoke-Tool -ToolName "autorunsc" -ArgumentList "-c" -Description "Autorun entries" -RequiresAdmin $true
575576
}
576577

577578
# Test: Network

0 commit comments

Comments
 (0)