add-block-to-hosts
A PowerShell script to block websites and domains by adding entries to your Windows hosts file.
Prompts for an address, then appends an entry in the form 0.0.0.0 example.com and flushes the DNS cache. Automatically elevates to administrator, detects duplicates, and optionally creates a timestamped backup of the hosts file before changes. Uses atomic writes with a temporary file and validates file integrity before and after modification.