Error Description
The Windows Remote Management (WinRM) error "The WinRS client cannot process the Receive request because the shell plugin returned an empty response to the request" occurs when a WinRS (Windows Remote Shell) session is abruptly terminated or failed to provide output. This typically happens because the remote process or shell crashed, reached a system resource limit, timed out, or had its execution policy blocked by security software.
Step-by-Step Fixes
Follow these steps in order to resolve the issue.
Step 1: Increase WinRM Memory Limits
The most common cause is the remote shell running out of allocated memory, causing the plugin to crash and return an empty response.
- Open PowerShell as an Administrator on the remote target machine.
- Check the current memory limit by running:
Get-Item WSMan:\localhost\Shell\MaxMemoryPerShellMB - Increase the memory limit to 1024 MB (or higher if needed) by running:
Set-Item WSMan:\localhost\Shell\MaxMemoryPerShellMB 1024 - Restart the WinRM service to apply changes:
Restart-Service WinRM
Step 2: Adjust Concurrent Users and Shell Limits
If multiple sessions are opening or a script spawns many processes, the system might block the plugin from responding.
- Open PowerShell as an Administrator on the remote machine.
- Increase the maximum number of concurrent shells allowed per user:
Set-Item WSMan:\localhost\Shell\MaxShellsPerUser 30 - Increase the maximum number of concurrent users:
Set-Item WSMan:\localhost\Shell\MaxUsers 10 - Restart the WinRM service:
Restart-Service WinRM
Step 3: Check for Process Crashes via Event Viewer
If memory is not the issue, the application or script you are executing remotely might be crashing.
- On the remote machine, press
Win + R, typeeventvwr.msc, and press Enter. - Navigate to Windows Logs > Application.
- Look for Error level logs at the exact timestamp the WinRS error occurred.
- If you see a crash related to
powershell.exe,cmd.exe, or your specific application, fix the underlying code or application crash.
Step 4: Verify Group Policy Controls
Sometimes Group Policy Objects (GPO) restrict the execution time or resource allocation of remote shells.
- On the remote machine, press
Win + R, typegpedit.msc, and press Enter. - Navigate to: Computer Configuration > Administrative Templates > Windows Components > Windows Remote Shell.
- Check the status of Specify maximum amount of memory in MB per Shell. If enabled, ensure it matches the high value set in Step 1.
- Check Allow Remote Shell Access and ensure it is set to Not Configured or Enabled.
Step 5: Check Antivirus and EDR Solutions
Endpoint Detection and Response (EDR) tools or Antivirus software often flag unexpected background shells as suspicious activity and silently terminate the process.
- Temporarily disable your antivirus or EDR on the remote machine.
- Run your WinRS command again.
- If it succeeds, add an exclusion rule for
winrshost.exeor the specific path of the script you are executing.
There may be some errors. Learn Microsoft