I've got the same issue. Did you find a solution at all?
Make sure the script is referring the right applications in your tell blocks. I had a problem with it when updating to sp2 last year
I've been using it for a while. My most recent issue with 10.8.2 & SP2 was this bit:
set emailAddress to do shell script "dscl . -read /Users/" & shortName & " EMailAddress | awk 'BEGIN {FS=": "} {print $2}'"
It was failing to grab the EMailAddress attribute so I switched it to:
set emailAddress to do shell script "dscl /Active Directory/SHORTDOMAIN/All Domains -read /Users/" & shortName & " EMailAddress | awk 'BEGIN {FS=": "} {print $2}'"
Everything else worked fine for me. It sounds like your the issue your facing is different but I thought I'd throw this in just in case it helps!
David
@aburrow Unfortunately not, I am still searching for a solution.
@acdesigntech Do you remember what you had to adjust in your script to get it working? I can see only two tell blocks 'Microsoft Outlook' and 'System Events' which appear OK.
@davidacland Thank you for that as it's useful to know. At the moment I am not using the getEMailAddressUsingDSCL function but using emailFormat instead.
I think I am going to carry on using the 14.1.0 Installer i built which works with the script and apply the 14.2.3 and 14.2.5 updates afterwards. This will cause the licencing issue to appear but I think there was an easy fix whereby you can replace the com.microsoft.office.licensing.plist file from a working Mac.
I had to keep resetting the tell application "Microsoft Outlook" as I was playing around on a dev Mac that did not have Outlook 2011 installed, so a lot of the time the tell would reference some whacky code.
What you might want to try is creating your microsoft user identity from scratch with SP 2 (log in as a new user, set your prefs accordingly, etc). The rule that runs the AS on first launch of outlook actually resides in the main identity folder, not preferences. You might have to recreate the main identity folder. I do remember tinkering with that too as I packaged first SP 1, then when SP came out we still hadn't rolled out MS Office 2011, but I didnt have to take SP2 changes into account.
Skorry, that should read i DID have to take the SP2 changes into account
My experience of this script can be summed up as "buggy". I implemented this about a month ago, found some parts of the configuration variables hadn't been implemented!
If I get the chance, i'll post my very slightly modified version tomorrow.
I'd love to see what you've come up with. Although I believe I've resolved the issues with dscl getting the users email address as well as the mecontact.
The biggest issue I seem to be having now is the "Exchange Setup" Scheduled Task not running for new users. It's like the preference file that contains the scheduled tasks for the user isn't being copied over to the templateuser or the Anotherlocation area.
Does anyone know where the scheduled tasks are actually stored? I believe I've found the scheduled tasks under Microsoft User DataMain IdentityData RecordsSchedulesetcetc.
Even though I can see the "Exchange Setup" Task. It still doesn't run as any other user.
Check the documents/ms office data/ms office 2011 identities/main identity
Random question: these scripts are AppleScripts. How are you firing them off in Casper?
I didn't. Since the user migration has to happen as the user themselves, I used talkingmoose's method of creating a scheduled job to launch this script upon first run of outlook. Worked like a charm.
I was not able to figure out how to run this via casper remote or policy. But I'd imagine that since it runs as the super user, you'd be able to issue a 'su <user>' and then invoke the applescript via a ```
osascript << EOS
script awesomeness
EOS
```
That SHOULD run the applescript as the user, from within bash.
@franton do you have a copy of your modified script that you can post or share? We're using this script in our environment. It works, but creates a 2nd and 3rd Untitled email account.
@franton do you have a copy of your modified script that you can post or share? We're using this script in our environment. It works, but creates a 2nd and 3rd Untitled email account.
I believe the script has been updated since I posted my previous reply. It may not be worth posting but my changes weren't to fix the behaviour you are seeing i'm afraid.
hI , i am uisng the same script on outlook 2011 14.4.3 I tried enabeling the kerberos user account setup , the error our exchange server showed was this Exchange server does not use kerberos authentication**, the other issue the schedllued script the run when oultlook opens keeps looping after running and confiuring a users account once , maybe becasue I am using diiferent options verify user emasil and server address he script this it hasnot completed the script setup completely.
any ideas how to stop the loop shcedule runnign othere than maually enabling it affter the script has run once.
@teknikal35
If the script is not deleting the schedule toward the end of its run then something just before it must be failing. The easiest advice I can offer for troubleshooting is to comment the lines toward the end that say "try" and "end try". Do this by adding "-- " before each line. Commenting means the script will ignore these lines.
Also, comment the "on error" line and all lines below it until you reach the "end try" line.
Here's the entire section as it should be modified:
if upgradeResponse is "New" then
-- Configure a brand new Outlook database
**[color=#FF0000]-- try[/color]**
if verifyEMailAddress is true then
set verifyEmail to display dialog "Please verify that your email address is correct." default answer emailAddress with icon 2 buttons {"Cancel", "OK"} default button {"OK"}
set emailAddress to text returned of verifyEmail
end if
if verifyServerAddress is true then
set verifyServer to display dialog "Please verify that your Exchange Server name is correct." default answer ExchangeServer with icon 2 buttons {"Cancel", "OK"} default button {"OK"}
set ExchangeServer to text returned of verifyServer
end if
tell application "Microsoft Outlook"
activate
set newExchangeAccount to make new exchange account with properties ¬
{name:"Mailbox - " & fullName, user name:shortName, full name:fullName, email address:emailAddress, server:ExchangeServer, use ssl:ExchangeServerRequiresSSL, port:ExchangeServerSSLPort, ldap server:DirectoryServer, ldap needs authentication:DirectoryServerRequiresAuthentication, ldap use ssl:DirectoryServerRequiresSSL, ldap max entries:DirectoryServerMaximumResults, ldap search base:DirectoryServerSearchBase, ldap port:DirectoryServerSSLPort}
-- The following lines enable Kerberos support if the userKerberos property above is set to true.
if useKerberos is true then
set use kerberos authentication of newExchangeAccount to useKerberos
set principal of newExchangeAccount to shortName & "@" & kerberosRealm
end if
-- The Me Contact record is now automatically created with the first account.
-- Set the first and last name of the Me Contact record.
set first name of me contact to firstName
set last name of me contact to lastName
set email addresses of me contact to {address:emailAddress, type:work}
end tell
**[color=#FF0000]-- on error
-- display dialog errorMessage with icon 2 buttons {"OK"} default button {"OK"}
-- error number -128
-- end try[/color]**
end if
Run the script now and it should show you where the error occurs. Once you've identified the problem, you will want to uncomment the lines by removing the "-- " you added.