1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
try{ #Con Invoke-WebRequest da error al cargar el certificado, mejor descargar el fichero JSON resultado Start-BitsTransfer "https://haveibeenpwned.com/api/v2/breachedaccount/$mail" -Destination resultado.txt "Cuenta comprometida" "La cuenta ha sido comprometida en: " gc .\resultado.txt | ConvertFrom-JSON } catch { if($_.Exception.Response.StatusCode.Value__ -eq 404) { "Cuenta no comprometida" } } |