diff --git a/Windows-Scripts/windows-repair.ps1 b/Windows-Scripts/windows-repair.ps1 index 9211b29..657b174 100644 --- a/Windows-Scripts/windows-repair.ps1 +++ b/Windows-Scripts/windows-repair.ps1 @@ -13,30 +13,30 @@ 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 | Out-Null # cmd abort scheduled shutdowns Write-Host "Clearing DNS" -ipconfig /flushsdns > $null +ipconfig /flushsdns | Out-Null Write-Host "Clearing ARP Cache" -Start-Process -FilePath "Remove-NetNeighbor" -Verb RunAs -ArgumentList " -Confirm:$false" +Start-Process -FilePath "Remove-NetNeighbor" -Verb RunAs -ArgumentList "-Confirm:$false" | Out-Null Write-Host "Renewing DHCP" -ipconfig /releasen > $null -ipconfig /renew > $null +ipconfig /releasen | Out-Null +ipconfig /renew | Out-Null -Write-Host "LAUNCHING WINDOWS MALICIOUS SOFTWARE REMOVAL TOOL (mrt) FOLLOW DIRECTIONS FOR FULL SCAN" +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" -Wait # 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 +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 Write-Host "SCHEDULING OFFLINE CHECK DISK AND REPAIR OF C: (chkdsk)" -Write-Host y | chkdsk /f /r C: # cmd checks C drive after reboot to waste time and fix errors (noninteractive) +Start-Process "cmd.exe" -Verb RunAs -ArgumentList "-c 'echo y | chkdsk /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