Outlook can "Restore missing folders for the default delivery location" if ran with a switch "outlook.exe /resetfolders". This is good for just one or two mailboxes. What can I do if I need to do this trick for multiple Exchange mailboxes? Asking dozens or even hundreds users to log on and execute the command is not an option for me, especially that some users do not even have Outlook installed. Is there any equivalent of this Outlook feature available for the Exchange Server that could be ran globally against all mailboxes? Perhaps PowerShell Cmdlet or third party tool (MfcMAPI, etc.)?
Edit: Some more info:
The company I work for develops some software that generally speaking, accesses Exchange mailboxes with MAPI. When accessing some mailboxes we get errors like the one below:
Failed to open default folder folderDefaultJournal. Error opening default folder. Invalid object entry id (MAPI_E_INVALID_ENTRYID) (0x80040107).
The problem presents itself randomly on Exchange 2003, 2007 and 2010 (2013 not tested), i.e. some mailboxes fail with this error and others not. We investigated closely those failing mailboxes and the environments but they look and work fine except for the above mentioned error.
The company decided not to look into this problem from the software development side as this issue is not common enough to justify proper debugging effort by the development dept. Hence my question here, not on stackoverflow.
In most cases of this issue I investigated, running "outlook.exe /resetfolders" by the owner of the failing mailbox solved the problem. So I am looking for an automated, scripted or manual but more convenient way to do exactly the same but at once for multiple mailboxes and by the domain admin, not the mailboxes owners.