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-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″ />
<OperationsConfiguration MaxOperationTimeoutSeconds=”900″ MaxShellIdleTimeoutMinutes=”15″ MaxEnvelopeSizeKB=”4096″/>
After this change and an IISreset, everything worked as expected.
Shane Skriletz, PEI