Rebuilding Outlook Spotlight index via self-service?

macmanmk
Contributor

We seem to have an awful lot of users that experience searching issues in Outlook 2016. Rebuilding the Outlook spotlight index followed by a reboot seems to resolve the issue, but it would be helpful to make the rebuild available as a self-service item. Does anyone know how I could script the command below to automatically pull in the locally logged in username whenever the user runs the policy in self-service?

mdimport -g /Applications/Microsoft Outlook.app/Contents/Library/Spotlight/Microsoft Outlook Spotlight Importer.mdimporter -d1 /Users/localusername/Library/Group Containers/UBF8T346G9.Office/Outlook/Outlook 15 Profiles/Main Profile

One potential wrinkle is that the user would need some indication that the indexing had completed and the machine should be restarted.

3 REPLIES 3

r0blee
New Contributor III

If you’re running a script via the jamf binary then it automstically populates $1, 2 and 3

$1 is the mount point $2 is the hostname of the machine
$3 is the current user

In terms of notifying the user you can make the reboot part of your policy and then under ‘user interaction’ (I think that’s right I’m not currently looking at a JSS) you can write s notification to say why the machine is rebooting and to give them the option to defer the reboot etc if it’s not a convenient time to reboot.

Rob.

sam_g
Contributor
Contributor

FYI - there are now some official outlook tools that were released recently, one of which specifically deals with this search issue in outlook 2016. See[ https://blogs.technet.microsoft.com/office_for_mac_support_team_blog/2017/08/10/mac-outlook-support-utilities](link URL)

I haven't tested the search fix on a user's computer yet, just on my mac, but you should be able to deploy the utility via self service.

dpratl
Contributor II

Hi @sag969,

Thank you very much! I didn't know these tools.

BR
Daniel