PowerShell – Is my NIC configured to register in DNS?

Some time ago I got asked how one could find if a network interface card (NIC) is configured to register itself in DNS.
In the GUI it’s a checkbox, a little hidden and you have to click a bit to find it.
The intention was to do an inventory of the environment to see which servers were properly configured.

So, PowerShell to the resque yet again 🙂

This works for PowerShell v1 and v2 but in v3 you can do this with a simple oneliner:


  1. Reidar J. Boldevin says:

    In V3 this will suffice:
    (Get-WmiObject Win32_NetworkAdapterConfiguration | Where-Object IPEnabled -eq “True”).FullDNSRegistrationEnabled
    Simplifying the Where command. Nice command, it might just come in handy 🙂

  2. Jeff Wouters says:

    Hi Reidar,
    Thanks for your comment, good one.
    Personally I’m still not using the simplified syntax for Where-Object since it only works with one comparison 🙁
    As soon as that’s expanded to multiple statements, I’m switching!
    But that’s a personal thing; your comment is still valid though 🙂

  3. Hi Jeff

    In V. 2 if there more that one nic this would return nothing:


    You would have to do
    $NIC | Select-Object -ExpandProperty FullDNSRegistrationEnabled
    $NIC | foreach-object { $_.FullDNSRegistrationEnabled}

    For extra shortening you could switch
    $_.IPEnabled -eq “true”

    For a final V. 1+2:
    $NIC = Get-WmiObject Win32_NetworkAdapterConfiguration | Where-Object {$_.IPEnabled}
    $NIC | Select-Object -ExpandProperty FullDNSRegistrationEnabled

    If you accept alias’es and you use V. 3 you could get an even shorter version:
    (Get-WmiObject Win32_NetworkAdapterConfiguration | ? IPEnabled).FullDNSRegistrationEnabled

    Thank you for you contribution(s) and I’ll See you in Copenhagen on the PSUG.DK meeting on May the 29th!


Leave a Reply

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