Hopefully something in here will help you out:
--work offline
tell application "Microsoft Entourage"
set working offline to true
end tell
--check if the account has an email address using dscl
set userName to do shell script "whoami"
set fullName to do shell script "dscl localhost -read /Active\\ Directory/All\\ Domains/Users/$USER displayName | sed 's/displayName: //' "
set firstName to do shell script "dscl localhost -read /Active\\ Directory/All\\ Domains/Users/$USER FirstName | sed 's/FirstName: //' "
set lastName to do shell script "dscl localhost -read /Active\\ Directory/All\\ Domains/Users/$USER LastName | sed 's/LastName: //' "
set eMailAddress to do shell script "dscl localhost -read /Active\\ Directory/All\\ Domains/Users/$USER EMailAddress | sed 's/EMailAddress: //' "
--set up the account and disable the schedule
if userName ≠ "EmailAddress: " then
tell application "Microsoft Entourage"
set the email address of Exchange account "default" to eMailAddress
set the domain of Exchange account "default" to "AD"
set the full name of Exchange account "default" to fullName
set the Exchange ID of Exchange account "default" to userName
set enabled of schedule "setup" to false
display dialog "Your account is being set up for the first time.
It will take a few minutes for all your data to synchronize with the mail server.
Please be patient. Thank you." buttons {"OK"}
set working offline to false
end tell
end if
On 6/14/06 8:51 AM, "Perbix, Michael" <[EMAIL PROTECTED]> wrote:
Does anyone have a good Applescript that prompts for an email name/password and can contact a domain controller to get the info for the account and set up an Entourage Exchange account?
I am looking to make a single run applescript for newly imaged machines where my users can put in the info and have the exchange account created for them.
Thank you in advance
-Mike
_______________________________________________
Michael Perbix
Lower Merion School District
Telecommunications Specialist
(610) 645-1964 - Work
(610) 896-2019 - Fax
