< Back

Add-HostFileEntry

Fri Jan 10, 2020 7:21 pm

NAME Add-HostFileEntry



SYNOPSIS

Adds an entry to the HOSTS file





SYNTAX

Add-HostFileEntry [-hostName] <String> [-ipAddress <String>] [<CommonParameters>]





DESCRIPTION

If it doesn't already exist, adds a line to the HOSTS file mapping the given host name to the given IP address





PARAMETERS

-hostName <String>

The host name to map



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ipAddress <String>

The IP address to map



Required? false

Position? named

Default value 127.0.0.1

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS





RELATED LINKS