diff --git a/cleanW10.ps1 b/cleanW10.ps1 index 22f1b34..e09fbfb 100755 --- a/cleanW10.ps1 +++ b/cleanW10.ps1 @@ -3,7 +3,7 @@ Import-Module NetSecurity #Useful to manipulate firewall rules Set-StrictMode -Version 2 $HOST_FILE = "$env:windir\System32\drivers\etc\hosts" $HOST_IP = "0.0.0.0" -$ErrorActionPreference = "Continue" +$ErrorActionPreference = "Stop" $ProgressPreference = "SilentlyContinue" #Thanks to https://gist.github.com/markembling/173887 @@ -499,5 +499,4 @@ try { catch { Write-Host -NoNewline -ForegroundColor Red "Error`n`t" Write-Host -ForegroundColor DarkRed $Error[0].Exception.Message -} -ri \ No newline at end of file +} \ No newline at end of file