Enabling DNS Registration Refresh Interval

To totally unlock this section you need to Log-in

On Active Directory domains is very important that clients set automatically their own DNS names on authoritative DNS servers for the domain to which they ara joined. To do this the Registration Refresh Interval policy is, almost, always enabled on business environments.

The official definition

The following text extract is the policy description that can be viewed directly using the Group Policy Editor (gpedit.msc) and Group Policy Management Console.

The Registration Refresh Interval specifies the interval used by DNS clients to refresh registration of A and PTR resource. This policy setting only applies to computers performing dynamic DNS updates.

Computers configured to perform dynamic DNS registration of A and PTR resource records periodically re-register their records with DNS servers, even if the record has not changed. This re-registration is required to indicate to DNS servers that records are current and should not be automatically removed (scavenged) when a DNS server is configured to delete stale records.

Warning: If record scavenging is enabled on the zone, the value of this policy setting should never be longer than the value of the DNS zone refresh interval. Configuring the registration refresh interval to be longer than the refresh interval of the DNS zone might result in the undesired deletion of A and PTR resource records.

To specify the registration refresh interval, click Enabled and then enter a value of 1800 or greater. The value that you specify is the number of seconds to use for the registration refresh interval. For example, 1800 seconds is 30 minutes.

If you enable this policy setting, registration refresh interval that you specify will be applied to all network connections used by computers that receive this policy setting.

If you disable this policy setting, or if you do not configure this policy setting, computers will use the local or DHCP supplied setting. By default, client computers configured with a static IP address attempt to update their DNS resource records once every 24 hours and DHCP clients will attempt to update their DNS resource records when a DHCP lease is granted or renewed.

On the Windows Registry side, the key that is created by the policy is the following:

Registry Hive: HKEY_LOCAL_MACHINE
Registry Path: Software\Policies\Microsoft\Windows NT\DNSClient
Value Name: RegistrationRefreshInterval
Value Type: REG_DWORD
Default Value: 1800
Min Value: 1800
Max Value: 4294967200

Enabling DNS Registration Refresh Interval

Note: This registry key is created by Group Policy when this GPO is in Enabled status. The GPO Default state is Not Configured, so this registry entry will be not present. For Disabled status this registry entry also will be not present.

Using GPMC (Group Policy Management Console)

We can use Group Policy Management Console to deploy this setting over the whole Active Directory domain with the following procedure:

Type gpedit.msc and press Enter (using Run):

Enabling DNS Registration Refresh Interval

In the Group Policy window please navigate to Computer Configuration -> Administrative Templates -> Network -> DNS Client and open Registration Refresh Interval.

Enabling DNS Registration Refresh Interval

  • Not Configured -> is the Default status.
  • Enabled -> choose this to apply this GPO.
  • Disabled -> this GPO will not be applied.

To finish press Ok button and close Group Policy window.

Enabling DNS Registration Refresh Interval

Using Command Prompt (As Administrator)

In Run (Start menu) type cmd, right click on cmd icon under the Programs and click on Run as administrator:

Enabling DNS Registration Refresh Interval

Please confirm User Account Control pop-up:

Enabling DNS Registration Refresh Interval

Select, right-click and copy a registry key from below, then right click on command prompt window, select Paste and press Enter to apply the registry value to your system:

Enabled:

REG add “HKLM\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient” /v RegistrationRefreshInterval /t REG_DWORD /d 1800 /f

Not Configured\Disabled:

REG DELETE “HKLM\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient” /v RegistrationRefreshInterval /f

Note: Manual editing of this registry key will not be reflected in Group Policy. If you modify this GPO from Group Policy this registry key will be rewritten.

VBScript

This setting can be also manipulated also by using VBScript code, as the following code shows:

Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = “.”
Set oReg=GetObject(“winmgmts:{impersonationLevel=impersonate}!\\” & strComputer & “\root\default:StdRegProv”)

strKeyPath = “SOFTWARE\Policies\Microsoft\Windows NT\DNSClient”
oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath
strValueName = “RegistrationRefreshInterval”

‘#### Enabled
dwValue = 1800
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue

‘#### Not Configured
‘oReg.DeleteValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName

Powershell

On modern system we could use also Powershell to manipulate and manage registry keys to enable or disable this policy:

Enabled

$RegKey = “HKLM:\SOFTWARE\Policies\Microsoft”

If(Test-Path ($RegKey + “\Windows NT”))
{
$RegKey = “HKLM:\SOFTWARE\Policies\Microsoft\Windows NT”
If(Test-Path ($RegKey + “\DNSClient”))
{
$RegKey = “HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient”
##Enabled
New-ItemProperty -path $RegKey -name RegistrationRefreshInterval -value 1800 -PropertyType DWord -Force
}
else
{
New-Item -path $RegKey -name DNSClient
$RegKey = “HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient”
##Enabled
New-ItemProperty -path $RegKey -name RegistrationRefreshInterval -value 1800 -PropertyType DWord
}
}
else
{
New-Item -path $RegKey -name Windows NT
$RegKey = “HKLM:\SOFTWARE\Policies\Microsoft\Windows NT”
New-Item -path $RegKey -name DNSClient
$RegKey = “HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient”
##Enabled
New-ItemProperty -path $RegKey -name RegistrationRefreshInterval -value 1800 -PropertyType DWord
}

Not Configured / Disabled

$RegKey = “HKLM:\SOFTWARE\Policies\Microsoft”
Remove-ItemProperty -Path($RegKey + “\Windows NT\DNSClient”) -name RegistrationRefreshInterval
If( (Get-Item -Path($RegKey + “\Windows NT\DNSClient”)).ValueCount -eq 0 -and (Get-Item -Path($RegKey + “\Windows NT\DNSClient”)).SubKeyCount -eq 0)
{
Remove-Item -Path($RegKey + “\Windows NT\DNSClient”)
If( (Get-Item -Path($RegKey + “\Windows NT”)).ValueCount -eq 0 -and (Get-Item -Path($RegKey + “\Windows NT”)).SubKeyCount -eq 0)
{
Remove-Item -Path($RegKey + “\Windows NT”)
}
}