I’ve posted an update to my EntourageExchangeSetup AppleScript on The Entourage Help Page that incorporates some needed fixes and finally includes the ability to set all properties of the Exchange Server, public folders server and LDAP server.
This AppleScript was written to be easily modified by an administrator to assist his Entourage users with the setups of their Exchange Server accounts. It has been tested with Entourage 2004 11.2.6 through 11.3.3 but should work with most versions of Entourage 2004. It should provide enough ideas for a novice scripter to be able to adapt it for use in his network in just a few minutes.
Following is a list of changes in the update:
Note: The first 10 bullet points complete the list of options that can be set for Exchange, Public folder and LDAP settings missing from the former scripts.
- Added the ability to set the Exchange Server SSL
- Added the ability to set the Exchange Server SSL port number
- Changed FreeBusyServer property name to PublicFolderServer to better match Entourage's field name
- Added the ability to set the Public Folder Server SSL
- Added the ability to set the Public Folder Server SSL port number
- Added the ability to enable LDAP Server authentication
- Added the ability to set the LDAP Server SSL
- Added the ability to set the LDAP Server SSL port number
- Added the ability to set the LDAP Server maximum results returned
- Added the ability to set the LDAP server search base
- Added the option to turn off the "Send & Receive All" schedule. This schedule applies to POP and IMAP accounts only and does nothing with Exchange accounts.
- Added a "Setup check" section to alert users if an Exchange account has already been configured in Entourage. The script is only necessary the first time a user needs to configure Entourage but some users double-click the script again instead of just launching Entourage. This is an effort to prevent a user from setting up a second account in Entourage pointing to the same Exchange account.
- Changed the Account Name to display "Mailbox - Last, First" (or whatever selected name format is selected) to match the display that Outlook for Windows users see.
- Added a customizable error message in case the Exchange account setup fails.
Download the script.

Comments (9)
William, thanks a bundle for posting this script! I have been using a script based on the MacEnterprise version developed by Greg Neagle, Michael Perbix and Joseph Swenson, which includes some fairly complex support for deriving the domain and server configuration from Directory Access. In a single-domain setup, this script is easier to parse and configure.
I'm thrilled that you added in the support for SSL on public folders; I could not figure out the syntax for that, and it was one of our manual steps. *phew*
I've added a tweak for setting the Me contact up with basic info; we also do a 'set working offline to true' before account setup and change it back at the end of the script to avoid download delays or auth dialogs midstream. Still looking for a way to disable the Junk Mail filter and add the Exchange deleted items folder to the Empty Deleted Items schedule.
--Mike
------
-- update the Me contact
display dialog "The address book warning that follows is expected. Once it is cleared, enter your password to connect. Note that you must verify the Junk Mail filter and Empty Deleted Items schedules manually (the Deleted Items schedule will open)." buttons {"OK"} default button "OK"
tell application "Microsoft Entourage"
activate
set properties of me contact to {name:fullName, address:emailAddress, company:"BigCompany, Inc.", business phone number:"347 555 1212", business web page:"http://www.tuaw.com"}
-- we can't edit the Empty Deleted Items sked directly, so we pop it open here
set working offline to false
open schedule 1
-- if we find out how to change the junk mail filter, we do it here
end tell
Thank you, Michael! I'm glad to hear it's been useful for you and really glad to hear some ideas for expanding its capabilities.
The Entourage dictionary wasn't very helpful to me either and for a while I was telling folks that some of the Exchange Server setup syntax was missing. Someone at Microsoft insisted the code was there and after using the Script Editor to derive the properties of my company's Exchange Server account I finally found the correct syntax.
If you don't mind I might steal your idea for the Me contact. That's a good one. Would be possible to take this a step further and create a default signature as well. For AD or LDAP connected machines a little scripting could possibly pull the user's phone number, office information, etc. and include those items in the contact record and signature too.
bill
The scrip is working like a charm thanks a lot.
How could I make it so it check the DAV SSL for Exchange server and also the public folder?
it would look somenting like this:
"make new Exchange account with properties {name:domainName, Exchange ID:shortName, domain:WindowsDomain, full name:fullName, email address:emailAddress, Exchange server:ExchangeServer, LDAP server:LDAPServer, LDAP requires authentication:true, LDAP requires SSL:false, free busy server:FreeBusyServer, DAV requires SSL:true}"
It just won't take it, seems like it would only take one DAV SSL... any ideas?
Hi Carlos!
The script is already set up to do that. Are you using version 1.2?
At the top of the script where properties are list look for:
property ExchangeServerSSL : false
property ExchangeServerSSLPort : 80
property PublicFolderServerSSL : false
property PublicFolderServerSSLPort : 80
Set "false" to "true" and the SSL option will automatically be enabled and change "80" to "443" or another port if you're using something non-standard.
Entourage's AppleScript dictionary names these options poorly, which is probably why you're getting confused.
"DAV requires SSL" = SSL for the Exchange Server
"LDAP requires SSL" = SSL for LDAP
"requires SSL" = SSL for public folders but only if you specify for public folders
If you specify each server type then you can simply use "requires SSL".
Hi William
Great script - but for your info, the link downloads the older version, not one with the extra properties you mention.
JP
Hi JP!
Not sure why the old file was replaced but the newer is available now.
Thanks for the notice.
Could this script (or a variant of it) be used to modify an existing Entourage account?
I ask because we're migrating Exchange servers this weekend, and I've realized all our Mac users will need to go into Entourage's account settings and click the check-box to enable SSL in order to connect to the new server. Or we can do it for them, via ARD. But if I could script it (or send a Unix command for it via ARD) that would save a ton of time and effort.
Unfortunately I have little experience with scripting, and this script is designed to set up a new account in Entourage. Presumably I could pull out all the other items, leaving only the commands to set SSL on, but i'm not sure how I'd make it take effect on the user's existing account setup. Have you run across something like that before?
Should be pretty simple. Try this:
tell application "Microsoft Entourage"
set requires SSL of Exchange account 1 to true
end tell
This assumes you have one Exchange account or that the account is the first in your list.
Fantastic! That should work fine, as there are no more than a handful of folks with more than one mail account set up in Entourage. Thank you very much!