Windows Error Fix: WinRM WSManEnumeratorAddObject Null Parameter
Error Description
This error occurs when the Windows Remote Management (WinRM) client attempts to enumerate objects, but the data structure returned by the remote server or the local provider is corrupted, unexpected, or completely null. WinRM expects a valid object when the enumeration mode is set to return the object details (Object or ObjectAndEPR).
The most common causes include:
- Corrupted WMI Repository: WinRM relies heavily on the Windows Management Instrumentation (WMI) infrastructure. If WMI is corrupted, it passes null data to WinRM.
- Corrupted WinRM Configuration: Damaged WinRM listeners or corrupted internal WSMan configurations.
- Incompatible PowerShell modules or broad queries: A script or management tool querying a vast infrastructure that triggers an unhandled edge case or returns empty payloads where data is expected.
Step-by-Step Fixes
Follow these solutions in order until the error is resolved.
Solution 1: Restart and Reset WinRM Service
The quickest fix is to restart the WinRM service and rebuild its configuration to clear any stuck or corrupt memory objects.
- Open the Start menu, type cmd, right-click on Command Prompt, and select Run as administrator.
- Stop the WinRM service by typing the following command and pressing Enter:
net stop winrm - Start the WinRM service again:
net start winrm - Reset the WinRM configuration back to its default settings by running:
winrm quickconfig -q - Check if the error still occurs.
Solution 2: Verify and Repair WMI Repository
Because WinRM fetches object properties directly from WMI, a corrupt WMI repository frequently causes the null pointer error.
- Open Command Prompt as administrator.
- Verify the consistency 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 salvaging fails, force a complete rebuild of the WMI repository with these commands (press Enter after each line):
net stop winmgmt /y winmgmt /resetrepository net start winmgmt - Restart your computer and test your WinRM connection again.
Solution 3: Re-register WMI Components and DLL Files
If the underlying Windows components cannot serialize the WinRM data correctly, re-registering the operating system's management libraries will fix it.
- Open Command Prompt as administrator.
- Run the following command to re-register all WMI
.moffiles:CD C:\Windows\System32\Wbem for /f %s in ('dir /b *.mof') do mofcomp %s - Next, re-register the DLL files by running:
for /f %s in ('dir /b *.dll') do regsvr32 /s %s - Restart your computer.
Solution 4: Clean up WSMan Provider via PowerShell
If you are running specific scripts or using tools like System Center Configuration Manager (SCCM) or Hyper-V manager, clear out the cached WSMan provider path.
- Open the Start menu, search for PowerShell, right-click it, and select Run as administrator.
- Navigate to the WSMan provider drive to inspect the configuration:
cd WSMan:\localhost dir - If you notice dead listeners or outdated endpoints, remove them using the remove item command:
Remove-Item .\Listener\* -Recurse - Run
winrm quickconfigagain to reconstruct clean listeners.
ERROR_WSMAN_CANNOT_PROCESS_FILTER | ERROR_WSMAN_CLIENT_ENUMERATORADDEVENT_NULL_PARAM | ERROR_WSMAN_ADDOBJECT_MISSING_EPR | ERROR_WSMAN_NETWORK_TIMEDOUT | ERROR_WINRS_RECEIVE_IN_PROGRESS
There may be some errors. Learn Microsoft