How to fix "The WinRM client cannot process the request. The EPR parameter for the WSManEnumeratorAddObject function is null or zero, but the enumeration mode is EPR or ObjectAndEPR."
The WinRM error message "The WinRM client cannot process the request. The EPR parameter for the WSManEnumeratorAddObject function is null or zero, but the enumeration mode is EPR or ObjectAndEPR" typically occurs when there is a mismatch or corruption in the Windows Management Instrumentation (WMI) repository, an issue with the WS-Management (WSMan) configuration, or outdated/corrupted Windows PowerShell components trying to communicate with remote or local services.
This error often triggers when system administrators try to run specific PowerShell cmdlets, connect to Exchange Server, or initiate remote management sessions where the End Point Reference (EPR) data structure is missing or improperly formed during data enumeration.
Here is a step-by-step guide to fix this issue easily.
Step 1: Run PowerShell as Administrator
Most WinRM and WMI repairs require elevated permissions.
- Press the Windows Key.
- Type PowerShell.
- Right-click on Windows PowerShell and select Run as administrator.
Step 2: Restart the WinRM Service
Sometimes the WSMan enumerator cache gets stuck, and a simple service restart can flush out the bad parameters.
- In the elevated PowerShell window, type the following command and press Enter:
Restart-Service WinRM -Force - Test your original command to see if the error is resolved.
Step 3: Repair and Rebuild the WMI Repository
If restarting the service does not work, the underlying WMI repository providing data to WinRM might be corrupted.
- Check the health of your WMI repository by running:
winmgmt /verifyrepository - If the output says "Repository is not consistent", run the following command to repair it:
winmgmt /salvagerepository - If the issue still persists, you can force a rebuild by running:
winmgmt /resetrepository - Restart your computer after resetting the repository to let changes take effect.
Step 4: Reset the WinRM Configuration
If the EPR parameters are failing due to a corrupted WinRM configuration listener, resetting the configuration back to default values will fix it.
- Open your elevated PowerShell window again.
- Run the following command to reset and reconfigure WinRM:
winrm quickconfig -q - Next, reset the WSMan provider setup by running:
Set-WSManQuickConfig -Force
Step 5: Update or Reinstall Windows Management Framework (WMF)
If you are seeing this error on older versions of Windows (like Windows Server 2012 R2 or Windows 7/8), it is frequently caused by a known bug in older PowerShell versions interacting with modern WSMan enumerators.
- Check your current PowerShell version by running
$PSVersionTable.PSVersion. - If you are on an older build, download and install the latest Windows Management Framework (WMF 5.1) or upgrade to modern PowerShell 7+ from the official Microsoft website.
ERROR_WSMAN_CLIENT_ENUMERATORADDEVENT_NULL_PARAM | ERROR_WSMAN_ADDOBJECT_MISSING_OBJECT | ERROR_WSMAN_NETWORK_TIMEDOUT | ERROR_WINRS_RECEIVE_IN_PROGRESS | ERROR_WINRS_RECEIVE_NO_RESPONSE_DATA
There may be some errors. Learn Microsoft