Removes all custom host entries from this computer's hosts file.
Reset-HostsFile [[-Path] <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
Sometimes you want to start over. This method removes all hosts entries from your hosts file after the default localhost entry.
By default, the current computer's hosts file is reset. You can operate on a custom hosts file by passing its path to the
|Name||Type||Description||Required?||Pipeline Input||Default Value|
The path to the hosts file to modify. Defaults to the local computer's hosts file.
|CommonParameters||This cmdlet supports common parameters. For more information type
If your hosts file contains something like this:
127.0.0.1 localhost 10.1.2.3 myserver 10.5.6.7 myserver2
Reset-HostsFile, your hosts will contain:
Reset-HostsFile -Path my\custom\hosts
Resets the hosts file at