From 93687c7137431cdd8b05d193f98156142bb56a00 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Thu, 11 Jun 2020 10:02:07 +0000 Subject: [PATCH] Improved refresh_dns_cache.ps1 --- Scripts/refresh_dns_cache.ps1 | 7 ++++--- Scripts/refresh_domains.csv | 21 +++++++++++++++++++-- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/Scripts/refresh_dns_cache.ps1 b/Scripts/refresh_dns_cache.ps1 index a53fbd3e..4139b547 100755 --- a/Scripts/refresh_dns_cache.ps1 +++ b/Scripts/refresh_dns_cache.ps1 @@ -6,9 +6,10 @@ # Source: github.com/fleschutz/PowerShell # License: CC0 -$DomainList = import-csv refresh_domains.csv +$DomainTable = import-csv refresh_domains.csv -foreach($Domain in $DomainList) { - ping -c 1 $Domain +foreach($Line in $DomainTable) { + $Ignore = Invoke-WebRequest $Line.Domain } +write-host "Done." exit 0 diff --git a/Scripts/refresh_domains.csv b/Scripts/refresh_domains.csv index 5d26aea2..507677e0 100644 --- a/Scripts/refresh_domains.csv +++ b/Scripts/refresh_domains.csv @@ -1,5 +1,22 @@ -DOMAIN +Domain +aldi-sued.de +all-in.de +amazon.com +amazon.de +bild.de bing.com +bing.de +ebook300.com fleschutz.de +fritz.box +golem.de google.com - +heise.de +lidl.de +slashdot.com +microsoft.com +ubuntu.com +wired.com +youtube.com +youtube.de +zdf.de