Computer step by step
 Make your Pc better
Description:  

This policy setting determines the Domain Name System (DNS) suffix devolution level that DNS clients will use,
if the clients perform primary DNS suffix devolution in a name resolution process. When DNS suffix devolution
is enabled, the leftmost label of a primary DNS suffix is dropped on each successive query attempt, when a
query fails for a name to which a primary DNS suffix has been attached. The devolution level indicates the
minimum number of labels that must be added to the query string after the primary DNS suffix is devolved.

When a user submits a query for a single-label name, such as "example," a local DNS client attaches a suffix,
such as "microsoft.com” to the query, before sending the query to a DNS server. In this case, this results in
the query "example.microsoft.com.”

If a DNS suffix search list is not specified, the DNS client attaches the primary DNS suffix to a single-label
name. If this query fails, the connection-specific DNS suffix is attached for a new query. If none of these
queries is resolved, the client devolves the primary DNS suffix of the computer, attaches the devolved primary
DNS suffix to the single-label name, and submits this new query to a DNS server.

For example, if the primary DNS suffix aaa.bbb.ccc.ddd.microsoft.com is attached to the single-label name
"example” (which has no dot at the end), and if DNS suffix devolution is enabled and the level is set to 3, the
following queries would be run:  

Example.aaa.bbb.ccc.ddd.microsoft.com (If this query fails, for the next query the primary DNS suffix will
devolve to bbb.ccc.ddd.microsoft.com.)

Example.bbb.ccc.ddd.microsoft.com (If this query fails, for the next query the primary DNS suffix will devolve to
ccc.ddd.microsoft.com.)

Example.ccc.ddd.microsoft.com (If this query fails, for the next query the primary DNS suffix will devolve to
ddd.microsoft.com.)

Example.ddd.microsoft.com (If this query fails, no further queries can be made because the devolution level is
set to 3 and the primary DNS suffix contains 3 labels.)
 
If you enable this policy setting, DNS clients on the computers to which this setting is applied attempt to
resolve names that are concatenations of the single-label name to be resolved and the devolved primary
DNS suffix. The DNS clients will devolve the primary DNS suffix on each query attempt until the name is
successfully resolved, the devolution level specified in this setting has been reached, or the primary DNS
suffix name has two labels.

If you disable or do not configure this policy setting, DNS clients on the computers to which this setting is
applied do not attempt to resolve names that are concatenations of the single-label name to be resolved
and the devolved primary DNS suffix. If a Forest Root Domain (FRD) is present, no search list is configured,
and the query is for a single-label name, then the DNS client will devolve up to the FRD until the name is
successfully resolved.

Supported on: At least Windows 2000.
Primary DNS Suffix Devolution Level
Description Gpedit Regedit CMD Back VBScript PowerShell Script
Gpedit:   

Please perform the following steps:

Please go to Pearl button (Start) and click on the Search programs and files
For more information about the change from Start to Pearl button click here
Type gpedit.msc and press Enter
In the Group Policy window please navigate to Computer Configuration -> Administrative Templates ->
Network -> DNS Client and open Primary DNS Suffix Devolution Level.
Not Configured -> is the Default state
Enabled -> apply this GPO
Disabled -> this GPO will not be applied

To finish press ok button and close Group Policy window.
Description Gpedit Regedit CMD Up Back VBScript
Type regedit and press ok
Please confirm User Account Control pop-up
Microsoft official disclaimer

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by
using another method. These problems might require that you reinstall the operating system. Microsoft
cannot guarantee that these problems can be solved. Modify the registry at your own risk.

Note: This registry key is created by Group Policy when this GPO is Enable. The GPO Default state is Not
Configured -> this registry entry is not present. For Disable this registry entry is not present.

Please navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient and
locate:
DomainNameDevolutionLevel registry key
EnableDevolutionLevelControl registry key
Regedit:          

Please perform the following steps:

Please go to Pearl button (Start) and click on the Search programs and files
For more information about the change from Start to Pearl button click here
Description Gpedit Regedit CMD Up Back VBScript
Double click on DomainNameDevolutionLevel and edit the value:

To Enable:
Change the data value with:
DomainNameDevolutionLevel = 2
EnableDevolutionLevelControl = 1

To finish press ok button and close Registry Editor window

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.
PowerShell Script PowerShell Script
   
   
Description Gpedit Regedit Back CMD VBScript Up
Type cmd, right click on cmd icon under the Programs and click on Run as administrator
Please confirm User Account Control pop-up
Please select, right and copy a registry key from below, then right click on command prompt window
, select Paste and press Enter

Enabled:
REG add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient" /v DomainNameDevolutionLevel /t REG_DWORD /d 2 /f
REG add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient" /v EnableDevolutionLevelControl /t REG_DWORD /d 1 /f

Not Configured\Disabled:
REG DELETE "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient" /v DomainNameDevolutionLevel /f
REG DELETE "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient" /v EnableDevolutionLevelControl /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.
CMD:          

Please perform the following steps:

Please go to Pearl button (Start) and click on the Search programs and files
For more information about the change from Start to Pearl button click here
Description Gpedit Regedit Back CMD VBScript Up
VBScript:          

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
strValueName1 = "DomainNameDevolutionLevel"
strValueName2 = "EnableDevolutionLevelControl"
'Enabled
dwValue1 = 2
dwValue2 = 1
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName1,dwValue1
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName2,dwValue2
'Not Configured\Disabled
'oReg.DeleteValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName1
'oReg.DeleteValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName2
Description Gpedit Regedit Back CMD VBScript Up
PowerShell Script :          

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 DomainNameDevolutionLevel -value 2 -PropertyType DWord -Force
   New-ItemProperty -path $RegKey -name EnableDevolutionLevelControl -value 1 -PropertyType DWord -Force
 }
 else
 {
   New-Item -path $RegKey -name DNSClient
   $RegKey = "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient"
   ##Enabled
   New-ItemProperty -path $RegKey -name DomainNameDevolutionLevel -value 2 -PropertyType Dword
   New-ItemProperty -path $RegKey -name EnableDevolutionLevelControl -value 1 -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 DomainNameDevolutionLevel -value 2 -PropertyType Dword
 New-ItemProperty -path $RegKey -name EnableDevolutionLevelControl -value 1 -PropertyType DWord
}

Not Configured\Disabled

$RegKey = "HKLM:\SOFTWARE\Policies\Microsoft"
Remove-ItemProperty -Path($RegKey + "\Windows NT\DNSClient") -name DomainNameDevolutionLevel
Remove-ItemProperty -Path($RegKey + "\Windows NT\DNSClient") -name EnableDevolutionLevelControl
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")
 }
}
Up Back PowerShell Script PowerShell Script PowerShell Script