Last active
March 25, 2024 16:16
-
-
Save HamidRezaAshkiyan/52f714ccd90124dba7ae5f6666e1bca0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# World wide DNS | |
$Adguard = "94.140.14.14","94.140.15.15" | |
$AdguardFamilyProtection = "94.140.14.15", "94.140.15.16" | |
$Cloudflare = "1.1.1.2", "1.0.0.2" #"1.1.1.1","1.0.0.1" normal version | |
$CloudflareFamilyProtection = "1.1.1.3","1.0.0.3" | |
$Google = "8.8.8.8","8.4.4.8" | |
# Persian DNS | |
$Shecan = "185.51.200.2","178.22.122.100" | |
$begzar = "185.55.226.26","185.55.225.25" | |
Write-Host | |
"This is a script for setting DNS. Select a number to continue: | |
1. Shecan DNS | |
2. Adguard DNS | |
3. Cloudflare DNS | |
4. Google DNS | |
5. Set Automatic DNS | |
6. Custom DNS | |
9. Read DNS " | |
write-host "`n" | |
$selection = Read-Host -Prompt 'Witch one do you choose? ' | |
switch ($selection) | |
{ | |
1 { Set-DnsClientServerAddress -InterfaceAlias Wi-Fi -ServerAddresses $Shecan; Break } | |
2 { Set-DnsClientServerAddress -InterfaceAlias Wi-Fi -ServerAddresses $Adguard; Break } | |
3 { Set-DnsClientServerAddress -InterfaceAlias Wi-Fi -ServerAddresses $Cloudflare; Break } | |
4 { Set-DnsClientServerAddress -InterfaceAlias Wi-Fi -ServerAddresses $Google; Break } | |
5 { Set-DnsClientServerAddress -InterfaceAlias wi-fi -ResetServerAddresses; Break } | |
6 { | |
$customDNS = Read-Host -Prompt 'Enter your custom DNS ip: ' | |
Set-DnsClientServerAddress -InterfaceAlias Wi-Fi -ServerAddresses $customDNS | |
Break | |
} | |
} | |
get-DnsClientServerAddress -InterfaceAlias Wi-Fi | |
write-host "`n" | |
Read-Host -Prompt "Enter anything to exit" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment