Skip to main content

Windows Server – Management request too large

By October 19, 2015September 11th, 2020Blog, Microsoft

Recently, while trying to update the custom message on an Exchange Auto-Attendant, I was present with this error:

Starting a command on remote server failed with the following error message : The WinRM client sent a request to the remote WS-Management service and got a response saying the request was too large.

The file I was trying to upload wasn’t that big (a few hundred kb), but very small files could be uploaded successfully.

So, somewhere, there was a limit that was getting in my way. Based on the error, I thought it was a WinRM limit, so I increased that first:

Set-Location wsman:

Set-Location localhost

Set-Item .MaxEnvelopeSizekb 4096

Unfortunately, that didn’t do it. After even more digging I found numerous references that indicated that the web.config of the PowerShell virtual directory needed to have a matching limit. So I changed this line:

<OperationsConfiguration MaxOperationTimeoutSeconds=”900″ MaxShellIdleTimeoutMinutes=”15″ />

To this:

<OperationsConfiguration MaxOperationTimeoutSeconds=”900″ MaxShellIdleTimeoutMinutes=”15″ MaxEnvelopeSizeKB=”4096″/>

After this change and an IISreset, everything worked as expected.

Shane Skriletz, PEI

2 Comments

  • Bill says:

    This worked great for me. Thanks for the tip.

    One slight correction. There is a slash missing in the command:
    Set-Item .MaxEnvelopeSizekb 4096

    It should be:
    Set-Item .\MaxEnvelopeSizekb 4096

  • ExchangeN00b says:

    I am new so sorry for the probably simple question. Where do I find the web.config file? Where is the Powershell virtual directory?

Leave a Reply