EPM2012R2 : Failed to load powershell module 0x8004100e (invalid namespace)

Sometimes, you may have this error when you run a cmdlet from the MpProvider powershell module whereas the module is well imported.

epm111

The root cause is WMI repository. It means that WMI is corrupted.

What is the WMI repository ?

It is the database that stores meta-information and definitions for WMI classes.

How to fix this issue ?

1/ First, you need to stop the winmgmt service. It will also stop IP Helper Service and SMS Agent Host service. Check that the service is well stopped by running the command again.

epm11

2/ Next, you rename the following folder : C:\Windows\System32\wbem\Repository

epm12

3/ Uninstall the EPM client

4/ Reboot the computer. It will create a new Repository folder.

5/ Ok, now install the EPM client

6/ Import the powershell module and run a cmdlet to check that WMI repository is OK.

 

Source that help me to solve my issue : http://blogs.technet.com/b/askperf/archive/2009/04/13/wmi-rebuilding-the-wmi-repository.aspx

About Nicolas 282 Articles
I work as an IT Production Manager, based in Paris (France) with a primary focus on Microsoft technologies. I have 10 years experience in administering Windows Servers. . I am a Microsoft MVP for Cloud & Datacenter Management. I also received the PowerShell Hero 2016 award by PowerShell.0rg. And finally, I am "MCSE: Cloud Platform and Infrastructure", "MCSA: Windows Servers", "Administering & Deploying SCCM", and CheckPoint CCSA certified.