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.
