# DSC Configuration Size

**URL:** <https://forums.powershell.org/t/dsc-configuration-size/3457>\
**Category:** DSC\
**Created:** [November 25, 2014, 10:55am UTC](https://forums.powershell.org/t/dsc-configuration-size/3457 "2014-11-25T10:55:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![craig](https://avatars.discourse-cdn.com/v4/letter/c/ed8c4c/32.png) [@craig](https://forums.powershell.org/u/craig)\
**Post date:** [November 25, 2014, 10:55am UTC](https://forums.powershell.org/t/dsc-configuration-size/3457/1 "2014-11-25T10:55:30Z")

</div>

I may have gotten carried away with DSC here…

My configuration is over 3000 lines, and when I run Start-DscConfiguration I am getting this:

```
VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.
The WinRM client sent a request to the remote WS-Management service and was notified that the request size exceeded the configured MaxEnvelopeSize quota.
    + CategoryInfo : LimitsExceeded: [root/Microsoft/...gurationManager:String] [], CimException
    + FullyQualifiedErrorId : HRESULT 0x80338111
    + PSComputerName : HoofHearted
 
VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 0.648 seconds
```

Reducing the size of the configuration to below 1000 lines makes the error go away, which makes me wonder if there’s a limit to a configuration size.

---

<div class="post-metadata">

**Author:** ![donj](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/donj/32/137_2.png) [@donj](https://forums.powershell.org/u/donj)\
**Post date:** [November 25, 2014, 11:23am UTC](https://forums.powershell.org/t/dsc-configuration-size/3457/2 "2014-11-25T11:23:34Z")

</div>

You can tweak the MaxEnvelopeSize setting on the receiving machine’s WsMan: drive. It isn’t based on lines, though, it’s based on size - e.g., bytes. You should bug this in Connect, though. It might be that a larger default size should be used now that DSC is using this to transmit potentially large files.

That said, the _vision_ is that you’d be using Pull, not Push, which definitely avoids this entirely. This isn’t a limit on configuration size, it’s a limit on what the WinRM service is willing to choke down in one go.

---

<div class="post-metadata">

**Author:** ![craig](https://avatars.discourse-cdn.com/v4/letter/c/ed8c4c/32.png) [@craig](https://forums.powershell.org/u/craig)\
**Post date:** [November 25, 2014, 11:26am UTC](https://forums.powershell.org/t/dsc-configuration-size/3457/3 "2014-11-25T11:26:15Z")

</div>

OK, the error was a good indication of what was wrong. Increased the limit for WSMan on the MaxEnvelopeSize and got it working.

This post my Jeffrey Snover helped (give that guy a raise!):  
[http://blogs.msdn.com/b/powershell/archive/2010/05/03/configuring-wsman-limits.aspx](http://blogs.msdn.com/b/powershell/archive/2010/05/03/configuring-wsman-limits.aspx)

---

<div class="post-metadata">

**Author:** ![craig](https://avatars.discourse-cdn.com/v4/letter/c/ed8c4c/32.png) [@craig](https://forums.powershell.org/u/craig)\
**Post date:** [November 25, 2014, 11:34am UTC](https://forums.powershell.org/t/dsc-configuration-size/3457/4 "2014-11-25T11:34:49Z")

</div>

Thanks for the reply, Don. I’ve made the suggestion in Connect:  
[https://connect.microsoft.com/PowerShell/feedbackdetail/view/1039717/wsman-maxenvelopesize-limits-dsc-configurations](https://connect.microsoft.com/PowerShell/feedbackdetail/view/1039717/wsman-maxenvelopesize-limits-dsc-configurations)

---

<div class="post-metadata">

**Author:** ![georg-aminger](https://avatars.discourse-cdn.com/v4/letter/g/3ec8ea/32.png) [@georg-aminger](https://forums.powershell.org/u/georg-aminger)\
**Post date:** [March 21, 2016, 1:13am UTC](https://forums.powershell.org/t/dsc-configuration-size/3457/5 "2016-03-21T01:13:47Z")

</div>

Command:

```
Set-Item WSMan:\localhost\MaxEnvelopeSizekb 10000
```

---

<div class="post-metadata">

**Author:** ![mlanderos](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@mlanderos](https://forums.powershell.org/u/mlanderos)\
**Post date:** [June 7, 2017, 12:57pm UTC](https://forums.powershell.org/t/dsc-configuration-size/3457/6 "2017-06-07T12:57:00Z")

</div>

Old post but the information is still relevant. I had recently updated my Configuration Management from using a DSC Pull Server to utilizing a 3rd party tool and was running into this error often as my DSC configuration file grew.

Good to know.  
-Michael

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 9:16pm UTC](https://forums.powershell.org/t/dsc-configuration-size/3457/7 "2024-05-16T21:16:41Z")

</div>

Closed on May 16, 2024, 9:16pm UTC


