Remove-HostEntry
SYNOPSIS
Remove a host entry
SYNTAX
ByIpAddress
Remove-HostEntry -IpAddress <IPAddress> -Section <String> [<CommonParameters>]
ByHostName
Remove-HostEntry -HostName <Object> -Section <String> [<CommonParameters>]
ByHostEntry
Remove-HostEntry -InputObject <Object> -Section <String> [<CommonParameters>]
DESCRIPTION
Remove a host entry
EXAMPLES
Example 1
PS C:\> Get-HostEntry -Ip 8.8.8.8 | Remove-HostEntry
Gets a host entry and uses the bound parameter InputObject to remove the entry
PARAMETERS
-HostName
The host name to remove
Type: Object
Parameter Sets: ByHostName
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-InputObject
The host file entry to remove
Type: Object
Parameter Sets: ByHostEntry
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-IpAddress
The IP address to remove
Type: IPAddress
Parameter Sets: ByIpAddress
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Section
The section to remove in
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.