locked
Using DHCP powershell modules - getting unexpected output for DNSConfiguration RRS feed

  • Question

  • Hi,

    I am using the Powershell DHCP module with the hope of exporting a list all DHCP scopes on all DHCP servers and specifically listing the current DNS servers that are being used for each scope.

    I have been using the following cmdlet:  get-dhcpscope -server [SERVERNAME].

    This does indeed yield a list of all scopes on the server, but where I expected to see the addresses of the DNS servers configured for each scope, it reports 'Inherited from Parent'.  

    Now, if I use the cmdlet:  get-dhcpscope -server [SAMESERVER] -scope [x.x.x.x] | get-dhcpoption -optionid 6, it accurately reports the addresses of the DNS servers, which in some cases are different than those defined at the server level.

    Has anyone come across this scenario?

    Thank you in advance!

    JC

    • Moved by Bill_Stewart Saturday, July 12, 2014 1:32 PM Question outside forum scope
    Thursday, April 10, 2014 3:44 PM

Answers

  • I will.  Thank you again.
    • Marked as answer by Jupooka Monday, January 5, 2015 2:41 PM
    Thursday, April 10, 2014 9:34 PM

All replies

  • That is exactly correct.  The local scope options trump the server.  Each scope usually has its own settings as it is usually a subnet with its own DNS - perhaps a site DNS.

    These are not scripting questions.  You should post this kind of question in the server forum for the DHCP servers you are using.  They will explain how this works.


    ¯\_(ツ)_/¯

    Thursday, April 10, 2014 3:52 PM
  • Thank you for the reply.

    However, seeing that the individual scope does indeed trump the server, then when I ran get-dhcpscope -server [SERVERNAME], which spits out a list of each scope and their individual settings,  I would expect that each of the scopes would show the overriding DNS servers, not 'Inherited from Parent'.

    I would not consider this a DHCP question.  The issue is that a Powershell module is not providing the expected output.  The DHCP part is understood and not the problem.

    Thursday, April 10, 2014 5:57 PM
  • There are a great many DHCP modules.  You fail to say which one you are trying to use.


    ¯\_(ツ)_/¯

    Thursday, April 10, 2014 6:04 PM
  • My apologies.  It is the one posted at the following link:

    _http://gallery.technet.microsoft.com/scriptcenter/05b1d766-25a6-45cd-a0f1-8741ff6c04ec

    I am running Windows 2008 R2 DHCP servers, no 2012 yet.

    Thursday, April 10, 2014 6:16 PM
  • My apologies.  It is the one posted at the following link:

    _http://gallery.technet.microsoft.com/scriptcenter/05b1d766-25a6-45cd-a0f1-8741ff6c04ec

    I am running Windows 2008 R2 DHCP servers, no 2012 yet.

    Did you post your issue for the author in the Q & A tab?


    ¯\_(ツ)_/¯

    Thursday, April 10, 2014 7:58 PM
  • I did, but it's a relatively older post so he may not be checking in too frequently.  Hopefully they will see it.

    Thanks!

    Thursday, April 10, 2014 8:25 PM
  • I did, but it's a relatively older post so he may not be checking in too frequently.  Hopefully they will see it.

    Thanks!

    You can also spend some time trying to add trace messages to find out why it is not behaving as you believe it should.  I quickly looked at ti an it uses the API calls so it should work.  Perhaps your DHCP server is not set up the way you think it is or something else is wrong.


    ¯\_(ツ)_/¯

    Thursday, April 10, 2014 8:35 PM
  • I will.  Thank you again.
    • Marked as answer by Jupooka Monday, January 5, 2015 2:41 PM
    Thursday, April 10, 2014 9:34 PM
  • I will.  Thank you again.

    You are welcome.  If you decide to debug then start a new topic with a more specific question about your debugging issue.  It is more likely to get you more respondents then a highly general product question.


    ¯\_(ツ)_/¯

    • Marked as answer by Jupooka Monday, January 5, 2015 2:40 PM
    • Unmarked as answer by Jupooka Monday, January 5, 2015 2:41 PM
    Thursday, April 10, 2014 9:39 PM