The WinRM client sent a request to the remote WS-Management service and was notified that the request size exceeded the configured MaxEnvelopeSize quota.

Michael Eriksson 126 Reputation points
2021-03-26T14:27:29.117+00:00

In our new Exchange 2019 CU8 environment I very often get the error "The WinRM client sent a request to the remote WS-Management service and was notified that the request size exceeded the configured MaxEnvelopeSize quota." when I try to run a command.

We have just started migrating from 2013 ant this morning after I had migrated the first 200 mailboxes I thought I remove all move requests, so I ran Get-MoveRequest -MoveStatus completed | Remove-MoveRequest and got the error.

I checked the configured size and it looked good I think

[PS] C:\windows\system32>Get-Item -Path WSMan:\localhost\MaxEnvelopeSizeKb

WSManConfig: Microsoft.WSMan.Management\WSMan::localhost

Type Name SourceOfValue Value


System.String MaxEnvelopeSizekb 4096

I think 4096 should be plenty for such a command.

Anyone experienced this? I know I can increase the value, but should it really be needed? If so is there a max supported size?

Regards

Michael

Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,345 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yuki Sun-MSFT 40,856 Reputation points
    2021-03-29T05:58:00.62+00:00

    Hi @Michael Eriksson ,

    I did much research regarding "MaxEnvelopeSizeKb" but didn't see any statement about its maximum supported size. However, as regards to the error message you encountered above, to the best of my knowledge, in most cases it can be resolved by increasing the value of MaxEnvelopeSizeKb. I've seen in several links that the value was raised to 8000 or higher, so agree with Andy that it's suggested to have a go by setting it to a larger value like 8192 and check the result.

    Here are some relevant links for your reference:
    winrm set winrm/config @{MaxEnvelopeSizekb="8192"} :: Error - The IP Filter is invalid
    Exchange 2013 in EMC you get he WinRM client sent a request to the remote WS-Management service and was notified that the request size exceeded the configured MaxEnvelopeSize quota.
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    Update:

    To modify the maxEnvelopeSize value via registry subkeys please refer to the steps below:

    Important: Follow the steps in this section carefully. Serious problems might occur if you modify the registry incorrectly. Before you modify it, back up the registry for restoration in case problems occur.

    1. Launch Registry Editor(regedit.exe) on the Exchange server, access to the path below:
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WSMAN\Client
    2. Double click "maxEnvelopeSize" in the right pane, choose "Decimal", change the value to "8192":
      83776-registry.jpg
      1. Run the command below to check the result:
      Get-Item -Path WSMan:\localhost\MaxEnvelopeSizeKb

    83770-result.jpg


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Andy David - MVP 141.5K Reputation points MVP
    2021-03-26T16:15:48.25+00:00

    I'd set to 8192 and see how that looks.
    I have had to this in the past - similar to:

    http://chrisreinking.com/fixing-exchange-2010-winrm-maxenvelopesize-exceeded-error/

    0 comments No comments

  2. Michael Eriksson 126 Reputation points
    2021-03-29T11:34:40.657+00:00

    Hi,

    Thank you both for your answers. I went ahead and tried to update the setting to 8192, but got an error I can't get my head around.

    Set-Item : The system cannot find the file specified.

    When trying to run Set-Item -Path WSMan:\localhost\MaxEnvelopeSizeKb -Value 8192

    If I do a get-item -path WSMAN:\localhost* everything looks ok

    WSManConfig: Microsoft.WSMan.Management\WSMan::localhost

    Type Name SourceOfValue Value


    System.String MaxEnvelopeSizekb 4096
    System.String MaxTimeoutms 60000
    System.String MaxBatchItems 32000
    System.String MaxProviderRequests 4294967295
    Container Client
    Container Service
    Container Shell
    Container Listener
    Container Plugin
    Container ClientCertificate

    I feel rather stupid right now...... Any ideas on that to?

    Regards

    Michael