This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Powershell script for adding/removing/showing entries to the hosts file. | |
# | |
# Known limitations: | |
# - does not handle entries with comments afterwards ("<ip> <host> # comment") | |
# | |
$file = "C:\Windows\System32\drivers\etc\hosts" | |
function add-host([string]$filename, [string]$ip, [string]$hostname) { |