Skip to content

Instantly share code, notes, and snippets.

@ovidiu-ionescu
Last active June 27, 2023 16:03
Show Gist options
  • Save ovidiu-ionescu/1d64b55362fd4ce60049b1343b03f202 to your computer and use it in GitHub Desktop.
Save ovidiu-ionescu/1d64b55362fd4ce60049b1343b03f202 to your computer and use it in GitHub Desktop.
Manipulate the Nrpt table in Windows to enable split DNS
# Remove all existing entries
Get-DnsClientNrptRule |ForEach { Remove-DnsClientNrptRule -Name $_.Name -Force }
# Everything ending in domain.com gets resolved by the specified DNS servers
Add-DnsClientNrptRule -Namespace ".domain.com" -NameServers @("10.0.0.10", "10.0.0.11")
# see what's in the table
Get-DnsClientNrptRule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment