< Back

Clear-GCHostsFile

Mon Jan 13, 2020 8:04 pm

NAME Clear-GCHostsFile



SYNOPSIS

Deletes all content from the hosts file.





SYNTAX

Clear-GCHostsFile [[-Force]] [<CommonParameters>]





DESCRIPTION

After running 'Clear-GCHostsFile' the local hosts file will be

empty including all ip/host and comment values.



An exception will be thrown if the current console session does not

have write access to the hosts file.



Type 'Get-Help Clear-GCHostsFile -Online' for extra information.





PARAMETERS

-Force [<SwitchParameter>]

Prevents display of the confirmation dialog

which is displayed by default.



Required? false

Position? 1

Default value False

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

System.Boolean







RELATED LINKS