locked
PowerShell DSC on Fail-over Clusters RRS feed

  • Question

  • Hello :

    I am working on a PowerShell Desired State Configuration project and would like to use that to setup WS 2012 DHCP servers with fail-over options. Now since WS 2012 DHCP server comes with the scope fail-over option - I am not exactly sure on how to get DSC to work and not mess up what the fail-over is supposed to do.

    More details -

    I am setting the scope options using DSC which means, if someone changes the scope, DSC will change it back. That said, if both nodes gets the same DSC configuration - DSC will try to apply the settings and at the same time - Fail-over will apply changes.

    Let me know if that makes sense and what should be the best practice.

    -A

    Monday, August 10, 2015 6:12 PM

Answers

  • Hello,

    The current DHCP DSC resources from Microsoft don't use or configure the failover feature.

    You can have a look at what it does on github using this link

    https://github.com/PowerShell/xDhcpServer

    It means that these resources won't mess with the failover configuration and if you want the DSC resource to handle the failover configuration, you'll have to write your own custom DSC resource.

    For your 2nd question about whatif someone changes the scope. The answer is twofold.

    If this person changes the configuration and applies it, no problem, that's the purpose of DSC.

    If this person changes the configuration in the GUI and ignores the DSC configuration, it depends. If the LCM (local configuration manager) is set to 'ApplyAndAutoCorrect', well the DSC will restore the scope into the desired state defined in your configuration. If it's set to 'ApplyAndMonitor', it will only register the drift. If it's set to 'ApplyOnly', the LCM does nothing and what was changed via the GUI remains. The LCM properties are documented on this page: https://technet.microsoft.com/en-us/%5Clibrary/Dn249922.aspx (the description of the LCM behavior I made assumes you don't have a pull server)

    • Proposed as answer by Elaine Jing Tuesday, September 8, 2015 6:57 AM
    • Marked as answer by Elaine Jing Wednesday, September 9, 2015 10:14 AM
    Tuesday, August 11, 2015 7:46 AM