Enterprise Deployment Manual

Table Of Contents
90 Appendix C Sample Scripts
Sample AppleScript for iPhone Configuration Utility
This sample script demonstrates creating configuration files using iPhone Configuration
Utility for Mac OS X.
tell application "iPhone Configuration Utility"
log (count of every configuration profile)
set theProfile to make new configuration profile with properties
{displayed name:"Profile Via Script", profile
identifier:"com.example.configviascript", organization:"Example Org.",
account description:"This is a configuration profile created via
AppleScript"}
tell theProfile
make new passcode payload with properties {passcode required:true,
simple value allowed:true}
make new restrictions payload with properties {YouTube allowed:false}
make new WiFi payload with properties {service set identifier:"Example
Wi-Fi", security type:WPA, password:"password"}
set theWiFiPayload to make new WiFi payload
delete theWiFiPayload
make new VPN payload with properties {connection name:"Example VPN
Connection"}
set theVPNPayload to make new VPN payload
delete theVPNPayload
make new email payload with properties {account description:"Email
Account 1 Via Scripting"}
make new email payload with properties {account description:"Email
Account 2 Via Scripting"}
make new Exchange ActiveSync payload with properties {account
name:"ExchangePayloadAccount"}
make new LDAP payload with properties {account description:"LDAP
Account 1 Via Scripting"}
make new LDAP payload with properties {account description:"LDAP
Account 2 Via Scripting"}
make new web clip payload with properties {label:"Web Clip Account 1
Via Scripting"}
make new web clip payload with properties {label:"Web Clip Account 2
Via Scripting"}
end tell
end tell