Register WMI DLL files: Run the commands in cmd.
regsvr32 %windir%\system32\wbem\wmidcprv.dll
regsvr32 %windir%\system32\wbem\wbemprox.dll
Register MOF (Management Object Format) files:
Run the following commands to ensure that MOF files are correctly registered:
mofcomp %windir%\system32\wbem\wmiprvsd.mof
mofcomp %windir%\system32\wbem\cimwin32.mof
In my case, one of the files was missing and I followed the next step:
Restore Corrupted System Files with DISM and SFC Since the MOF file is missing, it could indicate that other important files are also missing or corrupted. Let's try to use SFC and DISM tools to fix the system:
Run SFC (System File Checker):
In Command Prompt as Administrator, run the following command:
sfc /scannow
After finishing, just restart the computer, but first run:
netsh advfirewall firewall add rule name="Allow WMI" protocol=TCP dir=in localport=135,49152-65535 action=allow
To open WMI ports.