Skip to content

Instantly share code, notes, and snippets.

@dkittell
dkittell / hosts.ps1
Last active March 7, 2019 12:29 — forked from markembling/hosts.ps1
Powershell script for adding/removing/viewing entries to the hosts file.
#
# Powershell script for adding/removing/showing entries to the hosts file.
#
# Known limitations:
# - does not handle entries with comments afterwards ("<ip> <host> # comment")
#
# Original Script: https://gist.github.com/markembling/173887/1824b370be3fe468faceaed5f39b12bad010a417
# Modified Script: https://gist.github.com/andreymir/405b924d32dace51af2b
# Modified Script: https://gist.github.com/lantrix/052dff5737957aae4e25
#