diff --git a/Windows-Scripts/windows-repair.ps1 b/Windows-Scripts/windows-repair.ps1 index c5f6d5b..c667b63 100644 --- a/Windows-Scripts/windows-repair.ps1 +++ b/Windows-Scripts/windows-repair.ps1 @@ -4,7 +4,8 @@ # alt+a # alt+y # Run: -# powershell -c "iwr -Uri `"https://git.thecoven.info/PrincessPi/general-scripts-and-system-ssssssetup/raw/branch/main/Windows-Scripts/windows-repair.ps1`" > `"$env:TEMP\windows-repair.ps1`""; powershell.exe -ExecutionPolicy Bypass -File "$env:TEMP\windows-repair.ps1" +# iwr -UseBasicParsing -Uri "https://git.thecoven.info/PrincessPi/general-scripts-and-system-ssssssetup/raw/branch/main/Windows-Scripts/windows-repair.ps1" -OutFile "$env:TEMP\windows-repair0.ps1"; &"$env:TEMP\windows-repair0.ps1" + if (-not ([Security.Principal.WindowsIdentity]::GetCurrent().Groups -contains 'S-1-5-32-544')) { Start-Process -FilePath 'powershell' -Verb RunAs -ArgumentList " -ExecutionPolicy Bypass -File $PSCommandPath" } @@ -15,18 +16,21 @@ Write-Host "ABORTING ANY SCHEDULED SHUTDOWN" shutdown /a > $null # cmd abort scheduled shutdowns Write-Host "Clearing DNS" -ipconfig /flushsdns +ipconfig /flushsdns > $null + +Write-Host "Clearing ARP Cache" +Start-Process -FilePath "Remove-NetNeighbor" -Verb RunAs -ArgumentList " -Confirm:$false" Write-Host "Renewing DHCP" -ipconfig /release -ipconfig /renew +ipconfig /releasen > $null +ipconfig /renew > $null Write-Host "LAUNCHING WINDOWS MALICIOUS SOFTWARE REMOVAL TOOL (mrt) FOLLOW DIRECTIONS FOR FULL SCAN" # mrt # builtin malware removal tools Start-Process -FilePath "MRT.exe" -Verb RunAs -Wait # pause until mrt is done Write-Host "RUNNING DISM ONLINE IMAGE CLEANUP" -Start-Process -FilePath "DISM.exe" -Verb RunAs -ArgumentList " /Online /Cleanup-Image /RestoreHealth" -waut # powershell checks image and replaces bad filesm waits to fimish +Start-Process -FilePath "DISM.exe" -Verb RunAs -ArgumentList " /Online /Cleanup-Image /RestoreHealth" -Wait # powershell checks image and replaces bad filesm waits to fimish Write-Host "LAUNCHING SYSTEM FILE CHECKER (sfc)" Start-Process "SFC.exe" -Verb -RunAs -ArgumentList " /scannow" -Wait # cmd system file checker, retreives and replaces bad system files and waits fir it to finish