Update-DscConfiguration changed behaviour in POSH5

This topic contains 3 replies, has 3 voices, and was last updated by Profile photo of Hugo Tap Hugo Tap 1 year, 4 months ago.

  • Author
    Posts
  • #29657
    Profile photo of Hugo Tap
    Hugo Tap
    Participant

    Update-DscConfiguration -ComputerName $myserver -Wait -Verbose

    In POSH5 this results in "check if a new MOF is available on the pull server, and if so apply that MOF"
    In POSH4 this results in "check if a new MOF is available on the pull server, and if so apply that MOF OR if there is no new MOF, reapply the current MOF"

    You guessed it: I liked the behavior of POSH4 better. Is this change "by design"? And if so, what is the reasoning behind this?

    My workaround, prior to the Update-DscConfiguration command, run:
    Remove-DscConfigurationDocument -CimSession $myserver -Stage Current

  • #29660
    Profile photo of Don Jones
    Don Jones
    Keymaster

    It's by design, yes. I can't comment on the thinking since I'm not on the team 🙂 but the behavior was noted in early release notes.

  • #29673
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    Probably because they gave you finer control over the "re-apply existing" functionality with the new Start-DscConfiguration -UseExisting switch.

  • #29680
    Profile photo of Hugo Tap
    Hugo Tap
    Participant

    Start-DscConfiguration -UseExisting
    Seems to be the simplest method.
    Thanks Don & Dave

You must be logged in to reply to this topic.