Cannot connect to WMI provider.

What is this error while starting sql server configuration manager?
Cannot connect to WMI provider. You do not have permission or the server is unreachable. Note that you can only manage SQL Server 2005 and later servers with SQL Server Configuration Manager. 
Invalid class [0x80041010]

This happens while uninstall and install of SQL server ( wrongly a 64 bit one on 32 bit machine and reverse)- 

To fix it,
Locate the sqlmgmproviderxpsp2up.mof file on your machine.
and run following command.

C:\Program Files\Microsoft SQL Server\110\Shared>mofcomp sqlmgmproviderxpsp2up.mof