Thursday, September 8, 2011

MFCMAPI

Today I learned the power of MFCMAPI!

While troubleshooting an issue for a user I used MFCMAPI to view the MailStore for the user allowing me to view all folders in her mailbox including the hidden ones. Once I was able to locate the "missing" folder I was able to copy/move the folder back to the root of the mailbox.

Download MFCMAPI here: http://mfcmapi.codeplex.com/

Rebuilding theWMI Repository Rebuild

Here is  a nice little batch file that I found to rebuild your WMI repository.


If you see the following error code in your C:\windows\system32\wbem\logs\wbemcore.log you are seeing
0x80041002 errors then it would be a good idea to have that repository rebuilt. This also resolves issues with the the error code -2147217406 Not able to connect to WMI namespace "root\CIMV2"
Once the batch file below is run you will need to restart the device. Please note that if you have SCCM installed you will need to reinstall the client as all the WMI Namespaces are removed.
net stop winmgmt /y
c: 
cd %systemroot%\system32\wbem 
rd /S /Q repository 

regsvr32 /s %systemroot%\system32\scecli.dll 
regsvr32 /s %systemroot%\system32\userenv.dll 

mofcomp cimwin32.mof 
mofcomp cimwin32.mfl 
mofcomp rsop.mof 
mofcomp rsop.mfl 
for /f %%s in ('dir /b /s *.dll') do regsvr32 /s %%s 
for /f %%s in ('dir /b *.mof') do mofcomp %%s 
for /f %%s in ('dir /b *.mfl') do mofcomp %%s 

Thanks http://msmvps.com/blogs/lduncan/pages/20217.aspx for putting this together .