β If this tool helped you, please consider giving it a star! β

A comprehensive PowerShell-based DNS configuration tool with interactive network adapter and DNS provider selection. Supports all Windows versions and provides easy switching between popular DNS services.
- Universal Windows support: Works with Windows 7, 8, 10, and 11
- Interactive adapter selection: Choose from all active network adapters
- Multiple DNS providers: 12+ pre-configured DNS services
- Current settings display: Shows active DNS configuration and provider identification
- Automatic elevation: Requests administrator privileges when needed
- PowerShell version detection: Supports PowerShell 5.1, 7, and 7 Preview
- DNS cache clearing: Automatically flushes DNS cache after changes
- Provider identification: Automatically identifies current DNS provider
- Safe execution: Comprehensive error handling and validation
Provider | Primary | Secondary | Features |
---|---|---|---|
Cloudflare DNS | 1.1.1.1 | 1.0.0.1 | Fast, Privacy-focused |
Quad9 DNS | 9.9.9.9 | 149.112.112.112 | Malware blocking |
AdGuard DNS | 94.140.14.14 | 94.140.15.15 | Ad blocking |
NextDNS | 45.90.28.167 | 45.90.30.167 | Customizable filtering |
Provider | Primary | Secondary | Features |
---|---|---|---|
CleanBrowsing (Family) | 185.228.168.168 | 185.228.169.168 | Family-safe filtering |
CleanBrowsing (Adult) | 185.228.168.10 | 185.228.169.11 | Adult content filtering |
CleanBrowsing (Security) | 185.228.168.9 | 185.228.169.9 | Malware protection |
OpenDNS | 208.67.222.222 | 208.67.220.220 | Parental controls |
Provider | Primary | Secondary | Features |
---|---|---|---|
Google DNS | 8.8.8.8 | 8.8.4.4 | Fast, Reliable |
Control D | 76.76.19.19 | 76.76.2.22 | Custom filtering |
Comodo Secure DNS | 8.26.56.26 | 8.20.247.20 | Security focused |
- Download both files:
Launcher.bat
(Automatic elevation and PowerShell detection)dns_changer.ps1
(Main DNS configuration script)
- Place both files in the same directory
- Double-click on
Launcher.bat
or Right-click and select "Run as administrator" - The launcher will automatically:
- Request administrator privileges
- Detect best PowerShell version
- Launch the DNS configurator
- Follow the interactive prompts
- Download
dns_changer.ps1
- Open PowerShell as Administrator
- Navigate to the script directory
- Run:
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
- Execute:
.\dns_changer.ps1
- Displays all active network adapters
- Shows adapter names and descriptions
- Allows selection of specific adapter to configure
- Shows current DNS provider (automatically identified)
- Displays current DNS server addresses
- Indicates if using automatic (DHCP) configuration
- Lists all available DNS providers
- Shows primary and secondary DNS addresses
- Option to reset to automatic (DHCP)
- Sets new DNS servers on selected adapter
- Clears DNS cache for immediate effect
- Displays new configuration for verification
- Operating System: Windows 7, 8, 10, or 11
- PowerShell: Version 5.1 or higher (automatically detected)
- Privileges: Administrator rights (automatically requested)
- Network: At least one active network adapter
- Dependencies: Native Windows PowerShell cmdlets only
The launcher automatically detects and uses the best available PowerShell:
- PowerShell 7 Preview (modern features)
- PowerShell 7 (modern features)
- PowerShell 5.1 (Windows PowerShell - fallback)
Automatically identifies current DNS provider by comparing server addresses:
- Exact matches for popular providers
- Partial matches when only one server configured
- Custom DNS detection for unknown configurations
- Checks current privileges before execution
- Automatically requests elevation if needed
- Uses best available PowerShell for elevation
=== Select Network Adapter ===
1. Ethernet (Realtek PCIe GBE Family Controller)
2. Wi-Fi (Intel(R) Wi-Fi 6 AX201 160MHz)
0. Exit
=== Current DNS Settings ===
Adapter: Ethernet
DNS Provider: Google DNS
DNS Servers: 8.8.8.8, 8.8.4.4
=== Select DNS Provider ===
1. AdGuard DNS
2. CleanBrowsing (Adult)
3. CleanBrowsing (Family)
4. CleanBrowsing (Security)
5. Cloudflare DNS
6. Comodo Secure DNS
7. Control D
8. Google DNS
9. NextDNS
10. OpenDNS
11. Quad9 DNS
12. Restore Automatic DNS
n. Reset to Automatic (DHCP)
0. Exit
- Input validation: Robust input parsing and validation
- Error handling: Comprehensive error catching and reporting
- Automatic DNS cache clearing: Ensures changes take effect immediately
- Non-destructive: Only modifies DNS settings, no system changes
- Reversible changes: Easy restoration to automatic (DHCP) settings
- Privilege checking: Prevents execution without proper rights
- Cloudflare (1.1.1.1): No logging, fastest DNS
- Quad9: Blocks malicious domains
- AdGuard: Blocks ads and trackers
- CleanBrowsing Family: Filters adult content
- OpenDNS: Customizable parental controls
- Google DNS: Global infrastructure
- Cloudflare: Fastest response times globally
- Quad9: Threat intelligence blocking
- Comodo Secure DNS: Real-time protection
- Administrator Rights: Required for modifying network adapter settings
- Network Impact: Changes take effect immediately
- Cache Clearing: DNS cache is automatically flushed
- Backup: Current settings are displayed before changes
- Restoration: Easy restoration to automatic/DHCP settings
After successful execution:
- DNS servers are changed on selected adapter
- DNS cache is cleared for immediate effect
- New DNS provider is active
- Network applications will use new DNS servers
- Changes persist until manually changed or reset
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Use PowerShell best practices
- Maintain cross-Windows compatibility
- Include comprehensive error handling
- Follow the existing code structure
- Test on multiple Windows versions
This project is licensed under the WTFPL - see the LICENSE file for details.
This script modifies network DNS settings. While designed to be safe, use at your own risk. DNS changes affect internet connectivity. The authors are not responsible for any network connectivity issues.
- Microsoft for PowerShell and networking cmdlets
- DNS providers for offering public DNS services
- Community feedback for feature improvements
If you encounter any issues:
- Check the Issues section
- Ensure you're running as Administrator
- Verify your network adapter is active
- Check PowerShell version compatibility
- Review console output for specific error messages
- Try using the launcher for automatic setup
- "Script requires administrator rights": Use the launcher or run PowerShell as Administrator
- "No active network adapters found": Enable your network adapter
- "PowerShell execution policy": The launcher handles this automatically
Made with β€οΈ by EXLOUD
Simplifying DNS configuration across all Windows versions, one click at a time.