diff --git a/README.md b/README.md index c945935..c5e9a12 100644 --- a/README.md +++ b/README.md @@ -95,8 +95,10 @@ script=/tmp/install_script.sh && curl -s https://git.thecoven.info/PrincessPi/ge * `redundant-backup.ps1` #### anti-productivity * `IM_SO_TIRED_BOSS.ps1` + +### Clean up Windows! ```powershell -iwr -UseBasicParsing -Uri "https://git.thecoven.info/PrincessPi/general-scripts-and-system-ssssssetup/raw/branch/main/Windows-Scripts/windows-repair.ps1?nocache=$(Get-Random)" -OutFile "$env:TEMP\windows-repair3.ps1"; &"$env:TEMP\windows-repair3.ps1" +iwr -UseBasicParsing -Uri "https://git.thecoven.info/PrincessPi/general-scripts-and-system-ssssssetup/raw/branch/main/Windows-Scripts/windows-repair.ps1?nocache=$(Get-Random)" -OutFile "$env:TEMP\windows-repair-temp.ps1"; powershell -ExecutionPolicy Bypass -File "$env:TEMP\windows-repair-temp.ps1" ``` todo: diff --git a/Windows-Scripts/windows-repair.ps1 b/Windows-Scripts/windows-repair.ps1 index 3419aeb..b799adc 100644 --- a/Windows-Scripts/windows-repair.ps1 +++ b/Windows-Scripts/windows-repair.ps1 @@ -5,7 +5,7 @@ # alt+y # Run: # In powershell Terminal: -# iwr -UseBasicParsing -Uri "https://git.thecoven.info/PrincessPi/general-scripts-and-system-ssssssetup/raw/branch/main/Windows-Scripts/windows-repair.ps1?nocache=$(Get-Random)" -OutFile "$env:TEMP\windows-repair-temp.ps1"; &"$env:TEMP\windows-repair-temp.ps1" +# iwr -UseBasicParsing -Uri "https://git.thecoven.info/PrincessPi/general-scripts-and-system-ssssssetup/raw/branch/main/Windows-Scripts/windows-repair.ps1?nocache=$(Get-Random)" -OutFile "$env:TEMP\windows-repair-temp.ps1"; powershell -ExecutionPolicy Bypass -File "$env:TEMP\windows-repair-temp.ps1" # check if hasadmin rights, if notm run script in new terminal, clopsing old ## if not, carry on @@ -19,7 +19,7 @@ if (-not ([Security.Principal.WindowsIdentity]::GetCurrent().Groups -contains 'S Write-Host "`nFIXING WINDOWS FULL STYLE`n" Write-Host "ABORTING ANY SCHEDULED SHUTDOWN" - shutdown /a > $null # cmd abort scheduled shutdowns + shutdown /a 2> $null > $null # cmd abort scheduled shutdowns Write-Host "GENERATING AND DISPLAYING COMPREHENSIVE STABILITY REPORT" Start-Process "perfmon" -ArgumentList "/report" -Wait @@ -37,26 +37,27 @@ if (-not ([Security.Principal.WindowsIdentity]::GetCurrent().Groups -contains 'S ipconfig /releasen > $null ipconfig /renew > $null + Write-Host "Clearing all SAMBA Credentials" + net use * /delete /y > $null + Write-Host "LAUNCHING WINDOWS MALICIOUS SOFTWARE REMOVAL TOOL (MRT) FOLLOW DIRECTIONS FOR FULL SCAN" Start-Process "MRT.exe" -NoNewWindow -Wait # builtin malware removal tools -ArgumentList Write-Host "RUNNING DISM ONLINE IMAGE CLEANUP" DISM /Online /Cleanup-Image /RestoreHealth - # Start-Process "DISM.exe" -ArgumentList "/Online /Cleanup-Image /RestoreHealth" -Wait -NoNewWindow # powershell checks image and replaces bad filesm waits to fimis Write-Host "LAUNCHING SYSTEM FILE CHECKER (SFC)" SFC /scannow - # Start-Process "SFC.exe" -ArgumentList "/scannow" -Wait -NoNewWindow # cmd system file checker, retreives and replaces bad system files and waits fir it to finish Write-Host "SCHEDULING OFFLINE CHECK DISK AND REPAIR OF C: (CHKDSK)" - echo y | chkdsk /f /r C: # cmd checks C drive after reboot to waste time and fix errors (noninteractive) + echo y | chkdsk.exe /f /r C: # cmd checks C drive after reboot to waste time and fix errors (noninteractive) Write-Host "SCHEDULING WINDOWS DEFENDER OFFLINE SCAN MAY REBOOT UNEXPECTEDL" Start-MpWDOScan # powershell starts Windows Defender Offline Scan after reboot Write-Host "SCHEDULINMG OFFLINE MEMTEST" - mdsched.exe + mdsched.exe # schedule offline memtest Write-Host "`nREBOOTING IN 5 MINUTES MAX PROVBABLY SOONER`n" - shutdown /r /t 300 + shutdown /r /t 300 # shutdown in 5 minutes as failsafe } \ No newline at end of file