I don't know if many of you have this issue, but occasionally someone comes to me, particularly after a Outlook DB rebuild, and complains that the search feature on their Outlook no longer works.
I decided to offer them the following script through Self Service:
#!/bin/bash
loggedInUser=`ls -l /dev/console | awk '{ print $3 }'`
/usr/bin/su $loggedInUser -c "/usr/bin/mdimport ~${loggedInUser}/Documents/Microsoft User Data/Office 2011 Identities"
...and was wondering if anyone has a better way.
Admittedly, I'm not the most talented bash scripter, and specifically would like to identify the "Main Identity" folder they are currently using, so as not to re-index the several legacy Identity folders they have left over after previous rebuilds.
You'd think off the bat, 'Well, why not put "/Main Identity" at the end, knowing that the names of previous copies will be suffixed with a date?' but in my experience, I've run across people who have selected legacy rebuilds in the Database Rebuild utility, and from that point forward use as their primary something differently named than merely "Main Identity"
