Skip to content

Instantly share code, notes, and snippets.

@tojo17
Created July 16, 2025 17:05
Show Gist options
  • Save tojo17/689e10eb4a163a9c7d13b14d8b90025b to your computer and use it in GitHub Desktop.
Save tojo17/689e10eb4a163a9c7d13b14d8b90025b to your computer and use it in GitHub Desktop.
powershell.exe -c "Get-DnsClientServerAddress -AddressFamily IPv4|Select -ExpandProperty ServerAddresses" | tr -d '\r' | sed 's/^/nameserver /' | sudo tee /etc/resolv.conf >/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment