Skip to main content

Hosts File Modification Solution

Purpose

The purpose of this solution is to provide a quick and easy way to modify the Windows host file, either by adding values, gathering information, or resetting the host file to its defaults.

Associated Content

ContentTypeFunction
EPM - Windows Configuration - Script - Hosts File - AuditScriptThis script gathers information on the contents of the Windows host file and outputs them to the Host File Contents EDF.
EPM - Windows Configuration - Script - Hosts File - AddScriptThis script takes user parameters set when running the script and adds a host file entry to the machine's host file, then runs ipconfig /flushdns.
EPM - Windows Configuration - Script - Hosts File - ResetScriptThis script resets the host file to defaults, removing any and all customizations, and then runs ipconfig /flushdns.
CWM - Automate - Dataview - Hosts File - Audit [Script]DataviewIt shows the uncommented content of the host file in a single place.

Implementation

  1. Import the following scripts:
    1. EPM - Windows Configuration - Script - Hosts File - Audit
    2. EPM - Windows Configuration - Script - Hosts File - Add
    3. EPM - Windows Configuration - Script - Hosts File - Reset
  2. Import the Dataview CWM - Automate - Dataview - Hosts File - Audit [Script]
  3. Schedule the script EPM - Windows Configuration - Script - Hosts File - Audit to run against the desired computers at regular intervals to keep the dataview up to date.