Posted on 06-12-2017 10:16 AM
We have been working through a few different issues with our Outlook 2016 setup internally. One of the issues was with our GAL and OAB not coming down.
Through the wisdom of @talkingmoose, it seems that the background autodiscover
is the hinge on whether or not OAB/GAL downloads properly.
Here is the script that I developed on the backend in order to fix the issue:
AppleScript:
tell application "Microsoft Outlook"
set acctName to name of default account
set background autodiscover of exchange account acctName to true
end tell
Bash:
#!/bin/bash
sudo osascript << EOD
tell application "Microsoft Outlook"
activate
set acctName to name of default account
set background autodiscover of exchange account acctName to true
end tell
EOD
I created an extension attribute in order to check whether or not the background autodiscover was turned on. This helped make a smart group that I can deploy the script to.
AppleScript:
tell application "Microsoft Outlook"
set acctName to name of default account
get background autodiscover of exchange account acctName
end tell
Bash:
#!/bin/bash
discCheck=$(osascript -e "tell application "Microsoft Outlook"" -e "set acctName to name of default account" -e "get background autodiscover of exchange account acctName" -e "end tell")
echo "<result>${discCheck}</result>"
Hopefully this helps if you're wracking your head on this issue.