From e56c36506a770a5e103785a767e4d6e318ef15f0 Mon Sep 17 00:00:00 2001 From: PrincessPi3 Date: Sat, 13 Jun 2026 02:36:49 -0600 Subject: [PATCH] rc.1 --- Windows-Scripts/windows-repair.ps1 | 86 ++++++++++++++++-------------- 1 file changed, 47 insertions(+), 39 deletions(-) diff --git a/Windows-Scripts/windows-repair.ps1 b/Windows-Scripts/windows-repair.ps1 index 07fc5f1..91d0c12 100644 --- a/Windows-Scripts/windows-repair.ps1 +++ b/Windows-Scripts/windows-repair.ps1 @@ -73,65 +73,73 @@ if (-not ([Security.Principal.WindowsIdentity]::GetCurrent().Groups -contains 'S .............. '@ - Write-Host "`nFIXING WINDOWS FULL PRINCESS PI STYLE (THIS WILL TAKE MANY HOURS AND REBOOT MORE THAN ONCE, SLOWLY)`n" -ForegroundColor Magenta + Write-Host "FIXING WINDOWS FULL PRINCESS PI STYLE (THIS WILL TAKE MANY HOURS AND REBOOT MORE THAN ONCE, SLOWLY)`n" -ForegroundColor Magenta - Write-Host "ABORTING ANY SCHEDULED SHUTDOWN 1/18" - shutdown.exe /a > $null 2> $null # cmd abort scheduled shutdowns + $LogDir = "$env:USERPROFILE\Downloads\Repair-Log-$((Get-Date).ToString('yyyy-MM-dd-HHmm'))" # path to new log Dir + $ErrorLog = "$LogDir\error.log" # error log file - $LogDir = "$env:USERPROFILE\Downloads\Repair-Log-$((Get-Date).ToString("yyyy-MM-dd-HHmm"))" - Write-Host "Creating Log Dir at $LogDir 2/18" - New-Item -Path "$LogDir" -ItemType Directory > $null 2> $null + Write-Host "Creating Log Dir at $LogDir 1/20" + New-Item -Path "$LogDir" -ItemType Directory > $null 2>> $null # create log dir - Write-Host "GENERATING AND DISPLAYING COMPREHENSIVE STABILITY REPORT 3/18" - Start-Process "perfmon.exe" -ArgumentList "/report" -Wait + Write-Host "Initialize Log File $LogFile 2/20" + Write-Host "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))" 2>> "$ErrorLog" - Write-Host "GENERATING AND DISPLAYING STABILITY HISTORY REPORT 4/18" - Start-Process "perfmon.exe" -ArgumentList "/rel" -Wait + Write-Host "ABORTING ANY SCHEDULED SHUTDOWN 3/20" + shutdown.exe /a > $null 2>> "$ErrorLog" # cmd abort scheduled shutdowns + + Write-Host "Creating Log Dir at $LogDir 4/20" + New-Item -Path "$LogDir" -ItemType Directory > $null 2>> "$ErrorLog" # create log dir + + Write-Host "GENERATING AND DISPLAYING COMPREHENSIVE STABILITY REPORT 5/20" + Start-Process "perfmon.exe" -ArgumentList "/report" -Wait # running report + + Write-Host "GENERATING AND DISPLAYING STABILITY HISTORY REPORT 6/20" + Start-Process "perfmon.exe" -ArgumentList "/rel" -Wait # historical report - Write-Host "CLEARING DNS 5/18" - ipconfig.exe /flushsdns > $null + Write-Host "CLEARING DNS 7/20" + ipconfig.exe /flushsdns > $null 2>> "$ErrorLog" # flush dns cache - Write-Host "CLEARING ARP CACHE 6/18" - Remove-NetNeighbor -Confirm:$false > $null 2> $null + Write-Host "CLEARING ARP CACHE 8/20" + Remove-NetNeighbor -Confirm:$false > $null 2>> "$ErrorLog" # flush ARP Table - Write-Host "CLEARING ALL SAMBA CREDENTIALS 7/18" - net.exe use * /delete /y > $null 2> $null # nuke all samba creds + Write-Host "CLEARING ALL SAMBA CREDENTIALS 9/20" + net.exe use * /delete /y > $null 2>> "$ErrorLog" # nuke all samba creds automagically - Write-Host "RELEASING AND RENEWING DHCP 8/18" + Write-Host "RELEASING AND RENEWING DHCP 10/20" # release and renew dhcp - ipconfig.exe /release > $null - ipconfig.exe /renew > $null + ipconfig.exe /release > $null 2>> "$ErrorLog" + ipconfig.exe /renew > $null 2>> "$ErrorLog" - Write-Host "GETTING CONTROL OF WINDOWS UPDATE 9/18" - Install-Module -Name PSWindowsUpdate -Force > $null 2> $null + Write-Host "GETTING CONTROL OF WINDOWS UPDATE 11/20" + Install-Module -Name PSWindowsUpdate -Force > $null 2>> "$ErrorLog" Import-Module PSWindowsUpdate - Write-Host "UPDATING WINDOWS 10/18" - Get-WindowsUpdate -AcceptAll -Install -IgnoreReboot > $null + Write-Host "UPDATING WINDOWS 12/20" + Get-WindowsUpdate -AcceptAll -Install -IgnoreReboot > $null 2>> "$ErrorLog" - Write-Host "UPDATING MALWARE SIGNATURES 11/18" - Update-MpSignature # update windows defender malware siggs + Write-Host "UPDATING MALWARE SIGNATURES 13/20" + Update-MpSignature 2>> "$ErrorLog" # update windows defender malware siggs - Write-Host "RUNNING FULL WINDOWS DEFENDER SCAN 12/18" - Start-MpScan -ScanType FullScan # full windows defender scan + Write-Host "RUNNING FULL WINDOWS DEFENDER SCAN 14/20" + Start-MpScan -ScanType FullScan 2>> "$ErrorLog" # full windows defender scan - Write-Host "RUNNING DISM ONLINE IMAGE CLEANUP 13/18" - DISM.exe /Online /Cleanup-Image /RestoreHealth # online check for bad files + Write-Host "RUNNING DISM ONLINE IMAGE CLEANUP 15/20" + DISM.exe /Online /Cleanup-Image /RestoreHealth 2>> "$ErrorLog" # online check for bad files - Write-Host "RUNNING SYSTEM FILE CHECKER (SFC) 14/18" - SFC.exe /scannow # older check for bad files + Write-Host "RUNNING SYSTEM FILE CHECKER (SFC) 16/20" + SFC.exe /scannow 2>> "$ErrorLog" # older check for bad files - Write-Host "SCHEDULING ESSENTIAL FILE CHECK ON NEXT BOOT 15/18" - SFC.exe /scanonce # check essential files on next boot + Write-Host "SCHEDULING ESSENTIAL FILE CHECK ON NEXT BOOT 17/20" + SFC.exe /scanonce 2>> "$ErrorLog" # check essential files on next boot - Write-Host "SCHEDULING OFFLINE CHECK DISK AND REPAIR OF C: (CHKDSK) 16/18" - echo y | chkdsk.exe /f /r C: # cmd checks C drive after reboot to waste time and fix errors (noninteractive via y ffuckery) + Write-Host "SCHEDULING OFFLINE CHECK DISK AND REPAIR OF C: (CHKDSK) 18/20" + echo y | chkdsk.exe /f /r C: > $null 2>> "$ErrorLog" # cmd checks C drive after reboot to waste time and fix errors (noninteractive via y ffuckery) - Write-Host "SCHEDULINMG OFFLINE MEMTEST 17/18" - mdsched.exe /s # schedule offline memtest (noninteractive) + Write-Host "SCHEDULINMG OFFLINE MEMTEST 19/20" + mdsched.exe /s 2>> "$ErrorLog" # schedule offline memtest (noninteractive) - Write-Host "SCHEDULING WINDOWS DEFENDER OFFLINE SCAN MAY REBOOT UNEXPECTEDLY 18/18" - Start-MpWDOScan # powershell starts Windows Defender Offline Scan after reboot + Write-Host "SCHEDULING WINDOWS DEFENDER OFFLINE SCAN MAY REBOOT UNEXPECTEDLY 20/20" + Start-MpWDOScan 2>> "$ErrorLog" # powershell starts Windows Defender Offline Scan after reboot Write-Host "`nREBOOTING IN 5 MINUTES MAX PROVBABLY SOONER`n" shutdown.exe /r /t (60*5) # shutdown in 5 minutes as failsafe