PS: Append Blacklisted Sites To Windows Host File


Let me start by saying first and foremost, I am a SysAdmin and not a “computer geek / tinkerer”. Modifying the host file is almost NEVER the right answer for blocking sites. This should be done at the gateway or using a device like pi-hole or a web filtering service like OpenDNS. But, I just wanted to play around with PS on my machine to see what I could find, so here goes.

To Resolve:

1a. This script:

Downloads lists of “Blacklisted” Websites from three sources (below) and APPENDS them to your current Windows Host File.


This can be found in my gwConfiguration section.