Q:

Check url for specific text, download if it matches, continue to next if name cannot be resolved

I need this script to do the following:

Verify certain strings or regex of $url to verify I'm not being redirected (e.g. This address is valid, this address is not and redirects to the homepage.) prior to downloading, 
Continue to process sources.txt even if "The remote name could not be resolved:" occurs (I'm attempting to download blocklists, some of them get DDoS'd fairly regularly).

Current Behavior: Script is processing 3 of 5 $urls.  The 3rd errors out to a bogus address (on purpose), so do the 4th and 5th.  However, the 4th and 5th are never attempted.
try {
    import-Csv $intelSource | ForEach-Object {
         $storageDir = "$($intelDir)\$($_.threatType) $($_.threatSubtype)"
         $storageName = (Get-Culture).TextInfo
         $threat = $_.threatType + "_" + $_.threatSubtype    # Set this variable to save headaches passing it later
         $storageFile = "$($storageDir)\$($threat)_$($(get-date -f MM-dd-yy)).csv"    # Filename specified by sources.csv fields and today's date
         $url = $_.threatLocation
         if((Test-Path $storageDir) -eq 0) {
            mkdir $storageName.ToTitleCase($storageDir.ToLower());
            }
         # Begin Error Logging
         try {
            $intelCount++
            $webclient.DownloadFile($url,$storageFile)
         }
         catch {
            $intelErrorCount++
            $intelError = "" | Select "Time","Item","Message"
            $intelError.time = get-date -f G
            $intelError.item = $threat
            $intelError.message = $_.Exception.Message
            $errorLog += $intelError
            $intelError = $null
            echo $_.Exception|format-list -force | Out-File $intelDir\$threat"_ErrorLog_"$(get-date -f MM-dd-yy).txt -Append
            Write-Host $_.Exception
            Continue
         }
         # End Error Logging
         # Cleanup
         finally {
            $webclient.Dispose()
         }
         # Throttling (mainly future use with multiple sources)
         Start-Sleep 5
     }
}
finally { 
    if ($intelErrorCount -gt 0) {
        # Table Generation
        $errorLogTable = $errorLog | New-HTMLTable
        $HTML = New-HTMLHead
        $HTML += "<h3>Threat Intel Feed - Errors</h3>"
        $HTML += $errorLogTable | Close-HTML
        $email.Item('Subject') += "$($intelErrorCount) Error(s)"
        $email.Item('Body') += "$($intelErrorCount) of $($intelCount) sources failed. See attached for verbose log(s) `r`n`r`n $($HTML)"
        Get-ChildItem -Path $intelDir | Where {$_.Name -match "$($(get-date -f MM-dd-yy))"} | foreach{$_.fullname} | Send-MailMessage @email -bodyashtml
    }
    else {
        $email.Item('Subject') += "Success"
        $email.Item('Body') += "No errors for $($intelCount) sources."
        Send-MailMessage @email
    }
    $intelErrorCount = $null
    $intelCount = $null
    $errorLogTable = $null
    $errorLog = $null
}

A:

The problem is the Continue statement. Continue and Break don't work in a foreach-object script block as you'd expect. Change to a foreach statement:
foreach ($_ in (import-Csv $intelSource) {
  # Your existing code will probably work as is here
  # But you might want to rename $_ since it is an automatic variable
}

