Posted on 07-25-2016 11:32 AM
I would like to add a self service feature to rebuild the database in Outlook 2011.
Is this something that can be run via script OR should I get self service to just 'open' the Microsoft Database Utility?
Posted on 07-25-2016 11:47 AM
I don't think the actual functions that the Microsoft Database Utility performs when doing a rebuild can be scripted. As far as I know, its a proprietary Microsoft app and doesn't have a command line equivalent that you can use in a script.
I'm also pretty sure it does more than just blow away the existing identity and rebuild it, so I wouldn't attempt to do a rebuild that way either. Your best bet will probably be to open the utility for the user and send up an instruction window on top of it explaining what they need to do.
Posted on 07-25-2016 12:00 PM
Try this.
#! /bin/bash
# $3 is the logged in user - default for most policies.
sudo -u $3 /usr/bin/osascript <<ENDofOSAscript
display dialog "All Open Office Applications will now quit for Microsoft Outlook Database Rebuilding"
set apps to {"Microsoft Excel", "Microsoft PowerPoint", "Microsoft Word","Microsoft Outlook", "Microsoft Database Daemon"}
repeat with thisApp in apps
tell application thisApp to quit
end repeat
tell application "Microsoft Database Utility"
activate
rebuild "Main Identity"
end tell
ENDofOSAscript
Exit 0
Posted on 07-26-2016 11:54 AM
Thanks danielc29 ... I will try this on my test box.