Configuration Script Troubleshooting

Quick Post – Get “Register this connection’s addresses in DNS” Setting Quickly

Today I had an urgent requirement to get from a selected part of servers the network setting “Register this connection’s addresses in DNS”. The reason was, that some server didn’t register their settings in DNS because this setting was not set and therefore the A-record was not registered in DNS. My time was limited approximately 10 minutes to figure out if the setting was set or not. Thankfully PowerShell has been invented and saved me a lot of time. I just needed to write a script which I would like to share it might saves you also a bit of time.

To exactly understand about which setting we are talking about, see here…

image 

If the setting is enabled it will dump “True” if the setting is not set it will dump “False”.

Here the script I wrote…

image

If you run the script it will look like this…

image

It dumps the results into a text file and the result will look like this…

image

If this setting is not set it will look like this…

image

Now you have a text file with 3 column separated by “;” which you easily can import into Excel and work with it.

I hope you will find it useful, I know it is not the same challenge as building a death star space station but sometimes the small things rock the world.

Download the script here 

Update 05.03.2013: Because I was asked to provide a script which can be used to set the DNS registration setting I wrote a script which can be easily adapted. It is similar like the script above just read the comments in the script to adjust it to your needs….

image

You can download the script to set the DNS registration here

If you have any questions let me know.

Cheers,

Stefan

4 Replies to “Quick Post – Get “Register this connection’s addresses in DNS” Setting Quickly

  1. I think a great follow up would be how to flip that option on servers that didnt have it, or the other way if you wanted to have it disabled. I know for my lab, i only want one subnet to have dns registration enabled, the nic of which is supposed to have a friendlyname of “management”, but i’m not sure how granular you can go, nor if these options are even changeable in powershell 2 or 3.

    Either way, great script, and i as well i’m sure many others, thank you for the contribution!

    1. Hi Nick

      Thank you, well I was thinking about doing so, but then I decided maybe not. The reason is, there might are some Connections you don’t want to set this setting e.g. iSCSI. But as there is yet an official request :), I will do it. Stay tuned…

      Cheers,

      Stefan

  2. Heres the command
    Get-DnsClient | ? {$_.InterfaceAlias -like “InterfaceNameHere*”} | Set-DnsClient -RegisterThisConnectionsAddress:$false

    1. Hi Daniel

      Thanks for your comment. Keep in mind your Get-DNSClient cmdlet is only available on Windows Server 2012. I have updated my post with a script which will use WMI to set the DNS registration setting and therefore work also on older operating system.

      Cheers,

      Stefan

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.