diff --git a/Windows-Scripts/windows-repair.ps1 b/Windows-Scripts/windows-repair.ps1 index 37daa85..86b52ce 100644 --- a/Windows-Scripts/windows-repair.ps1 +++ b/Windows-Scripts/windows-repair.ps1 @@ -34,12 +34,15 @@ if (-not ([Security.Principal.WindowsIdentity]::GetCurrent().Groups -contains 'S Remove-NetNeighbor -Confirm:$false > $null Write-Host "CLEARING ALL SAMBA CREDENTIALS" - net use * /delete /y > $null + net use * /delete /y > $null 2> $null Write-Host "RENEWING DHCP" ipconfig /releasen > $null ipconfig /renew > $null + Write-Host "UPDATING MALWARE SIGNATURES" + Update-MpSignature # update windows defender malware siggs + Write-Host "LAUNCHING WINDOWS MALICIOUS SOFTWARE REMOVAL TOOL (MRT, MAY TAKE A LONG TIME, WONT SHOW STATUS)" Start-Process -FilePath "MRT.exe" -ArgumentList "/F:Y /Q" -Wait # do full microsoft malicious software removal scan in background automatically removing anything found, wait to proceed @@ -58,12 +61,12 @@ if (-not ([Security.Principal.WindowsIdentity]::GetCurrent().Groups -contains 'S Write-Host "SCHEDULING OFFLINE CHECK DISK AND REPAIR OF C: (CHKDSK)" 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 WINDOWS DEFENDER OFFLINE SCAN MAY REBOOT UNEXPECTEDLY" - Start-MpWDOScan # powershell starts Windows Defender Offline Scan after reboot - Write-Host "SCHEDULINMG OFFLINE MEMTEST" mdsched.exe /s # schedule offline memtest (noninteractive) + Write-Host "SCHEDULING WINDOWS DEFENDER OFFLINE SCAN MAY REBOOT UNEXPECTEDLY" + Start-MpWDOScan # powershell starts Windows Defender Offline Scan after reboot + Write-Host "`nREBOOTING IN 5 MINUTES MAX PROVBABLY SOONER`n" - shutdown.exe /r /t 300 # shutdown in 5 minutes as failsafe + shutdown.exe /r /t (60*5) # shutdown in 5 minutes as failsafe } \ No newline at end of file