if ($componentCheck -match "Component Store is\s+(\w+)") $status = $matches[1] if ($status -eq "Cleanable") Write-ColorOutput "⚠ Component store has redundant files (can be cleaned)" "Yellow" elseif ($status -eq "Corrupt") Write-ColorOutput "✗ Component store is corrupted!" "Red"
# File: AdvancedFileCorruptionChecker.ps1 # Windows 11 Advanced File Corruption Checker with Reporting param( [switch]$QuickScan, [switch]$FullScan, [switch]$Repair, [switch]$GenerateReport, [string]$ReportPath = "$env:USERPROFILE\Desktop\CorruptionReport.html" ) check for corrupted files windows 11
private void AppendColoredText(string text, System.Drawing.Color color) txtOutput.SelectionStart = txtOutput.TextLength; txtOutput.SelectionLength = 0; txtOutput.SelectionColor = color; txtOutput.AppendText(text); txtOutput.SelectionColor = txtOutput.ForeColor; txtOutput.SelectionLength = 0
Invoke(new Action(() => txtOutput.Text = output + "\n\n" + error; ParseResults(output, command); lblStatus.Text = $"operationName completed. Exit code: process.ExitCode"; )); catch (Exception ex) Invoke(new Action(() => txtOutput.Text = $"Error: ex.Message"; lblStatus.Text = "Operation failed"; )); ); txtOutput.SelectionColor = color
return $results Write-ColorOutput "========================================" "Cyan" Write-ColorOutput " Windows 11 File Corruption Checker" "White" Write-ColorOutput "========================================" "Cyan"