Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    [OT] Ensure-DSC for WindowsFeatures broken

    Scheduled Pinned Locked Moved Support
    4 Posts 2 Posters 8 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P Offline
      philippe.camelio_3885
      last edited by

      Hi,

      I'm moving slowly from Otter 3.0.24 to otter 2023.3 (docker).

      I am using Ensure-DSC functiuon to deploy WindowsFeatures like this:

      For a specific role:

      • set up a variable :
      @ListofWFeatures : @(RSAT-AD-PowerShell, RSAT-DNS-Server)
      

      Desired configuration

      # WindowsFeatures
      {
          foreach $WindowsFeature in @ListofWFeatures
          {
              Log-Information ===== $WindowsFeature;
                  Ensure-DscResource
                  (
                      Name: WindowsFeature,
                      Properties: %(Name:$WindowsFeature,IncludeAllSubFeature:true)
                  );
          }
      }
      

      On version 3.X, this is working fine (target w2022 / inedo agent 49)
      On version 2023, it is broken (target windows 2022 with Inedo agent 51)

      Error Unhandled exception: System.Management.Automation.Remoting.PSRemotingTransportException: Serialized XML is nested too deeply. Line 1, position 3508.
         at System.Management.Automation.Runspaces.AsyncResult.EndInvoke()
         at System.Management.Automation.PowerShell.EndInvoke(IAsyncResult asyncResult)
         at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
      ....
      

      Any help is welcome.

      Best regards
      PhilippeC.

      atrippA 1 Reply Last reply Reply Quote 0
      • P Offline
        philippe.camelio_3885
        last edited by

        I got around with a PSEnsure (v2) powershell script.

        1 Reply Last reply Reply Quote 0
        • atrippA Offline
          atripp inedo-engineer @philippe.camelio_3885
          last edited by

          Hi @philippe-camelio_3885,

          This is the result of a long-standing WONTFIX bug within PowerShell Remoting. Considering that DSC is effectively dead, we don't see any point in try to work-around the bug. You can see more details/discussion here (Otter role issue after upgrading to 22.0.2).

          In general, we advise all users to move away from PowerShell DSC. It was basically killed by Microsoft, and its corpse was resurrected to be used in Azure Automanage. From the docs:

          DSC 2.0 is supported for use with Azure Automanage's machine configuration feature. Other scenarios, such as directly calling DSC Resources with Invoke-DscResource, may be functional but aren't the primary intended use of this version.

          Since last year, there was a quasi-community effort started to bring back DSC as "DSC 3.0", but it's in early alpha and has no official support. Given the pace of similar PowerShell developments (like the v3 of PowerShell Gallery), I would expect 3-5 years for a somewhat stable version.

          Best,
          Alana

          P 1 Reply Last reply Reply Quote 0
          • P Offline
            philippe.camelio_3885 @atripp
            last edited by

            Hi @atripp

            Thanks for the update. Microsoft is killing me 🙄
            Best Regards

            PhilippeC.

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post
            Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation