Bruce Adamczak

I have spent years working in perfmon, so I thought I would share some tips and tricks on the tool!

Windows 2012 Core Survival Guide – DNS Suffix List

Windows 2012 Core Survival Guide – DNS Suffix List

  • Comments 2
  • Likes

DNS Suffix List

Learn about my 2012 Core Survival Guide here.

I often find in large enterprises that the DNS Suffix list is inconsistent, contains out dated domains, or is incomplete for the environment.  The DNS Suffix list is what allows us to use computer names instead of fully qualified domain names (FQDN).  This is a key part of TCP/IP name resolution.  In this blog I will cover how to view, set, and remove DNS Suffix lists.

Viewing the DNS Suffix Search List

To view the DNS suffix search list use the Get-DNSClientGlobalSettings cmdlet

PowerShell Command:

Get-DNSClientGlobalSetting

In the output below we show the DNS Global client settings for the computer. It show us that our DNS Suffix list has 4 domains in it.   

 

Since two of the domains above (OldDomain, SoldCompany) are no longer needed I will show you below how to set it correctly.  Your DNS suffix list should list the domain used most often first, followed by the next most use domains.   This will help reduce unnecessary DNS traffic.

Setting the DNS Suffix Search List

I change the DNS suffix search order list by using the Set-DnsClinetGlobalSettings cmdlet.

PowerShell Command:

Set-DnsClientGlobalSetting -SuffixSearchList @("contoso.com", "AD.contoso.com")

In the output below I changed the DNS suffix list to be Contoso.com and AD.contoso.com.  The nice thing about this cmdlet is you do not remove the old setting in order to give it a new setting.

 

Removing the DNS Suffix Search List

Removing the DNS Suffix list is nothing more than a special case of setting it.  In this case I set it using NULL.

PowerShell Command:

Set-DnsClientGlobalSetting -SuffixSearchList @("$Null")

In the output below I removed the dns suffix list of "contoso.com, ad.contoso.com". 

 

I hope you found this useful.  Please leave me a comment

Bruce

Comments
  • Bruce, I am very new to PS so excuse the question. From my Win 7 machine is there a reason why I would not get the Get-DNSClientGlobalSetting PS command? Is this PS command only available on Windows 2012 server?

    This would be really useful for me at the moment.

  • Blynk,

    Get-DNSClientGlobalSetting is a new cmdlet for 2012 and Windows 8.  technet.microsoft.com/.../jj590767(v=wps.620).aspx

    Bruce

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment