Posted on 08-13-2015 10:50 AM
Now that the schedules tab is removed from Outlook's preferences... has anyone figure out a way to apply a self configuration script like this one?
https://github.com/talkingmoose/Outlook-Exchange-Setup
Our users really enjoyed everything being automagically configured.
Solved! Go to Solution.
Posted on 10-18-2015 09:50 PM
More stuff ready for anyone who'd like to test...
I've devised a launchd setup that works well for me in my testing to automatically configure Outlook 2016 the first time it's launched. After a lot of research into launchd QueueDirectories and WatchPaths, the WatchPaths made the most sense because I can monitor for the existence of specific files. (Thanks, @eholtam, for your ideas. I adapted them for my own changes.)
The whole setup consists of one LaunchAgent file and two scripts. The only file you need to customize is the AppleScript. Everything else can just drop in place. The ROOT folder simply designates the "root" of the hard drive or "/". For now, be sure to keep the names and paths of the files and folders the same as I've created them unless you're comfortable changing the references in the three files.
I've also made minor changes to the AppleScript itself to better accommodate all potential settings not just Active Directory as well as accommodate this new setup.
You'll find everything here: https://github.com/talkingmoose/Outlook-Exchange-Setup-5.0
Click the Download ZIP button to the bottom right and locate these files in the ROOT folder:
Feedback, as always, is greatly appreciated.
Posted on 12-19-2016 10:36 AM
@talkingmoose how do you handle signatures? we want our users to have and image, and text similar how Windows handles. Signature templates
Posted on 12-19-2016 12:00 PM
@wmateo Not sure how others have doen this...
We did it by having an HTML template signature and associated images with unique tags that we replaced with data pulled from AD (name, email, phone number, title, etc..), we then used an Applescript call to Outlook to create a new signature using this template.
Unfortunately I am now off work until after the new year so can't easily check the scripting for you.
Posted on 12-19-2016 12:31 PM
@Look Since our AD enviroment is not really cleaned up yet. I was looking for a way to "prefill" the Signature area with a few default images, and dummy fields so user can enter name themselves.
Posted on 12-19-2016 12:38 PM
Well you can definately make an Applescript call to Outlook 2016 and tell it to create a new signature using an HTML file as the source, if you have any linked image files in the same directory and in the right format (png I think is what I used) then it will embed these in the signature as wel, this is new behaviour as of a fairly recent version upgrade, previously it just linked images, which sucked.
Not quite sure how the best way to go about creating the HTML signature, ours was originally supplied to me by branding, it was massively over complicated so I pulled it apart and rebuilt it with half the code, but it did mean it had all the correct stuff specified at the top, maybe you can export it in HTML from Windows or something, not sure.
Posted on 02-01-2017 01:40 PM
@talkingmoose Thoughts on updating an existing Outlook 2016 account with a new directory service server name? Something like this?
tell application "Microsoft Outlook"
try
set ldap server:xxxxxxxxxxx
end try
end tell
Posted on 02-01-2017 05:04 PM
@kbach, the syntax is close. You also need to specify the account. You may also want to set the other properties of the LDAP server (just to be thorough). I think the "try" statement is a good idea. Give this a shot:
tell application "Microsoft Outlook"
try
set ldap server of exchange account 1 to "ldap.company.com"
set ldap needs authentication of exchange account 1 to true
set ldap use ssl of exchange account 1 to true
set ldap port of exchange account 1 to 3269
set ldap max entries of exchange account 1 to 1000
-- rarely need to set this, but would be something like "CN=Users,DC=talkingmoose,DC=net"
set ldap search base of exchange account 1 to ""
end try
end tell
Optionally, you can replace the "1" in exchange account 1
with the Account Description if you want to call it by name:
set ldap server of exchange account "My Exchange Account" to "ldap.company.com"
AppleScript is pretty much the only way to set these attributes. It will require Outlook be running or it will launch Outlook automatically if it's not running. This probably isn't something you want to just spring on your users.
Posted on 02-03-2017 01:16 PM
@talkingmoose This worked perfectly, thanks!
tell application "Microsoft Outlook"
try
set ldap server of exchange account 1 to "xxxxx.xxxxx.com"
end try
end tell
Created the script, attached to policy with a trigger of a login hook..update successful.
Posted on 02-10-2017 05:20 AM
@talkingmoose I've never gotten this to work...whenever I run the "Package for deployment" it says "Package build failed. Verify ROOT and Scripts folders are in the same folder as this Package for Deployment app." Any idea what I'm doing wrong? I didn't change the folder structure of the download, running on 10.12.3.
Posted on 02-10-2017 05:34 AM
Posted on 02-10-2017 06:13 AM
@dpratl Thank you, I tried that too but no dice unfortunately. Also tried a different Mac (but it also runs 10.12.3) and I get the same issue.
Posted on 02-12-2017 10:13 AM
@jonlju, I'm seeing similar behavior and will look into it. I suspect this is sandboxing getting more and more strict.
In the meantime, it seems to work just fine if you open the Package for Deployment.app file in Script Editor (located in /Applications/Utilities) and run it from there. Just click the third button (Play button).
Posted on 02-25-2017 09:48 PM
I'm very new to this, so I'm sorry if this is obvious:
How do I prevent the package from suppressing the first run windows? Our staff are licensed through O365 and I'd like them to see the first run windows so they have an opportunity to activate Office when launching Outlook (which is usually the first Office app they launch).
Based on what I've seen in the scripts, it feels as though removing the .mobileconfig file from the package should be enough, but I wanted to make sure there wasn't a better method.
Thanks again to everyone on the hard work for this! As I learn more about packages and AppleScript I hope to contribute more myself.
Posted on 02-25-2017 11:16 PM
@OneSeventeen, the default Microsoft_Outlook_2016_First_Run.mobileconfig profile included with the package includes three keys. The combination of all three keys suppresses every first run dialog.
For Office 365 users, locate the com.microsoft.Outlook.plist file in the Extras folder. Open this plist file with a text editor such as TextWrangler, Xcode or TextEdit. Delete the kSubUIAppCompletedFirstRunSetup1507 key and the value below it. Save the file.
In your JSS, create a new Configuration Profile and choose the Custom Setting payload. Upload your edited plist file and save.
You can either download this Configuration Profile to make a new .mobileconfig profile that replaces the original in the ROOT > tmp folder or remove the original altogether and use Jamf to deploy the configuration profile.
Removing this one key will allow Office 365 users to activate Office but will suppress the Outlook setup dialog and let the script run.
Posted on 02-26-2017 06:57 AM
Awesome, thanks! I realize much of that was mentioned in the wiki, but I appreciate you spelling it out for me.
Posted on 06-23-2017 10:54 AM
@Look if you could forward me your script, that would be great. I would love to implement this in our org. Any way to also mass delete existing signatures?
Posted on 06-23-2017 11:09 AM
@wmateo This works via Apple Script, I tested it now:
tell application "Microsoft Outlook"
delete signature 1
end tell
Just replace the 1 with whatever signature you're trying to remove.
Posted on 08-11-2017 11:02 AM
Thanks for the script! My question is a bit off topic, but you sound like a very knowledgable group.
What ideas does anyone have for migrating On My Computer archives to Online Archives? We used an Entourage script and then OEAO to archive from Exchange to On My Computer.
Now that we are moving to 2016 with Online Archives we are trying to get the archives moved to the new Online Archives, but it appears you can only move (copy) one message at a time directly there, or move the messages back to the main account. The problem is we have users with huge archives that won't fit into their small exchange account and users with hundreds of folders that would each have to be manually moved.
I am hoping someone has done this before without too much pain. Thanks!
Posted on 08-11-2017 11:50 AM
@perweilerg RE: Online Archiving
The Mac Outlook options are not good, due to limitations with MS's EWS API.
There is a mac version of Quadrotech's Flightdeck being developed for mac, but it's still only beta quality (we are having issues getting it to work right).
Every other option i've found so far is pretty painful.
Posted on 09-06-2017 07:05 PM
Hi Guys,
We have this script in place for our Office 365 Instance an for the most part it works great, with the exception that it is running everytime that Outlook gets opened rather than just the first time.
I was not the person that initiated the script setup but it is just downright annoying for users now because they click on the Verify button all the time and create multiple exchange accounts taking up a huge amount of space.
any ideas?
Posted on 09-06-2017 10:19 PM
@BrentSlater, the script triggers using a launch agent in the current user's ~/Library/LaunchAgents folder. After successful setup, that launch agent is supposed to get deleted and not run again. Sounds like that's not happening.
Run this on a clean machine if you can and reproduce the problem. The script creates a log in the user's ~/Library/Logs folder. Does it indicate anything is failing?
Posted on 09-06-2017 11:23 PM
Hey @talkingmoose I can't see any log file for it...
Definitely something is up there.
I will do some more digging
Posted on 09-12-2017 10:46 PM
I'm getting this too actually, the error that comes back is:
Delete OutlookExchangeSetup5.plist file from user LaunchAgents folder: Failed.
Unload OutlookExchangeServer5.plist launch agent: Failed.
Will also do some digging.
Edit: Worked it out almost as soon as I posted this.
Some of my usernames have spaces in it - we're moving away from this, but there are still some users (me included) that have spaces.
I had to edit one of the lines to quote around the $HOME variable. Right down the bottom:
do shell script "/bin/rm "$HOME/Library/LaunchAgents/net.talkingmoose.OutlookExchangeSetup5.plist""
Note the escaped quotes.
Posted on 10-06-2017 09:01 PM
Hi all,
Having issues getting Outlook 15.38 to autoconfigure with @talkingmoose's configuration script. I get the following error in AppleScript when i manually run the .scpt:
error "The variable emailAddress is not defined." number -2753 from "emailAddress"
Any input would be greatly appreciated! Thanks!
Posted on 10-19-2017 01:35 PM
Hello All,
I'm happy that I seem to have everything working as expected. The last piece to the puzzle for me would be to figure out how to deal with the verify certificate popup to make this truly a seamless process for the end user. I'm currently using a configuration profile to deliver the .cer certificate payload. it's currently set to install automatically at the computer level. It does show up in the Keychain after selecting "Always Trust". When Outlook 2016 is launched for the first time, I'm getting the following verify certificate popup. Is there a way to make this box happy so that it doesn't appear on first run? Last piece to the puzzle, so close :)
Thanks in advance!
Gene
Posted on 10-19-2017 05:11 PM
@gbunner, it appears the .cer file you uploaded is not a copy of the root certificate used to sign your mail server's certificate. Deploy the .cer that signed your server's certificate in a configuration profile. It will be trusted on the Macs automatically. Any certificates you encounter as part of connecting to a server will be trusted because you'll have already trusted the root.
Posted on 10-20-2017 07:46 AM
That worked perfectly, Thanks for your assistance!
Posted on 11-16-2017 10:16 AM
Is there an easy way to set everything back to default as my first attempt at this after activating O365 I just got the first run screens.
Posted on 11-16-2017 12:20 PM
easiest way I’ve found is to just delete the user profile you tested on. This way it will delete the group containers.
Posted on 11-17-2017 08:57 PM
I'll agree with @rqomsiya. For something like this, a test macOS user account is ideal. No chance of cruft from earlier testing getting in the way and Fast User Switching or a virtual machine makes this easy to do.
I've worked with few folks directly to try and delete all the necessary folders and files for a reset. It's easy to forget something.
Posted on 11-27-2017 06:13 AM
@talkingmoose Thank you for all your hard work so far! I have used some of the scripts that you put together to get rid of Outlook's first run and welcome windows.
I am trying to set the Outlook authentication method to Kerberos instead of the regular User Name and Password. I just want the option to be pre-defined/pre-selected Kerberos, so that the users just input their email address. Note that we have Autodiscover feature in Exchange.
Can we acheieve that with a .sh or .scpt file?
Appreciate your help.
Posted on 11-27-2017 07:14 AM
@MusRM, if you're using my Outlook Exchange Setup script, one of the properties you can set at the top of the AppleScript is to use Kerberos. The syntax looks something like:
tell application "Microsoft Outlook"
set use kerberos authentication of exchange account 1 to true
set principal of exchange account 1 to "mmoose@talkingmoose.pvt"
end tell
Posted on 11-29-2017 06:02 AM
Hello,
When a new user logs in and opens Outlook for the first time, the first window they see is the "Set Up Your Email" popup window and then a few seconds later they get the username and password box for the auto connect to happen (which is good!) The problem that I'm seeing is when a user is presented with the first "Set up Your Email" window, they go down that rabbit hole and Outlook doesn't auto configure and in a lot of cases, they hit cancel on the username/password box that pops up a few seconds later.
My Question: Is there a way to disable the first "Set Up Your Email" window? this way they will only be presented with username/password dialog. Once we get that accomplished, then it's down to user training to go ahead and enter the password and not hit cancel.
Thanks!
Posted on 11-29-2017 07:32 AM
@gbunner, see line 51 of this spreadsheet:
https://docs.google.com/spreadsheets/d/1ESX5td0y0OP3jdzZ-C2SItm-TUi-iA_bcHCBvaoCumw/edit#gid=0
Mac admins requested the ability to block the automatic setup and Microsoft responded by providing us this key/value pair.
To create a Configuration Profile in your Jamf Pro server:
Create the plist with the setting (copy these two lines and paste into Terminal):
/usr/bin/defaults write ~/Desktop/com.microsoft.Outlook.plist
OverrideAccountConfigurationWindow -bool TRUE
Convert the new plist on your Desktop from binary to a plain text XML file:
/usr/bin/plutil -convert xml1 ~/Desktop/com.microsoft.Outlook.plist
In your JSS, create a new Configuration Profile with a Custom payload. Upload the com.microsoft.Outlook.plist file and save.
You can download the Configuration Profile for testing on a local machine before deploying to your Macs.
Posted on 12-07-2017 12:02 AM
@talkingmoose Do you have deployment guide on how to use the script at https://github.com/talkingmoose/Oulook-Exchange-Setup-5.0?
I am quite new to Mac and Jamf.
Thank you!
Posted on 12-07-2017 06:38 AM
@boonkeatgan, I do! Check out the wiki just a few tabs to the right of the download page:
https://github.com/talkingmoose/Outlook-Exchange-Setup-5/wiki
Posted on 12-07-2017 06:14 PM
@talkingmoose Thank you so much!
Posted on 12-08-2017 12:19 AM
@talkingmoose First of all, thank you for the Script. It is amazing and working for me.
The only thing is when i deploy the mobile config, it will prompted on error unable to configure. When i remove the mobile config, it is working fine.
Any idea whats wrong with the mobileconfig portion?
Posted on 12-08-2017 08:47 AM
@boonkeatgan, the mobileconfig file is there for convenience. If you want to remove it from the Package/ROOT/tmp/Outlook Exchange Setup 5
folder before making your deployment package, everything will work just fine.
Eventually, you may want to suppress some of the Outlook first run windows. You can create a configuration profile in Jamf to do this and deploy it using Jamf. That's effectively the same thing as deploying the mobileconfig file in the package. Let's worry about whether you need to do that after you've removed the mobileconfig file and tested.
Posted on 12-10-2017 08:39 PM
@talkingmoose Thank you! we are ok with the first run.
I saw you posted the Lync (somewhere in 2012), do you happen to have Skype for Business version too?
Posted on 12-10-2017 10:11 PM
@boonkeatgan, nothing for Skype, unfortunately. It's not something I have experience managing. But someone did a really nice job documenting the manageable settings here: