Someone else once posted a simple Ruby script that really helped me out getting started with this sort of thing ... Here's the one I use regularly to add our corporate resources to a user's account.
Code:
#!/usr/bin/ruby
user = ARGV[0]
system "zmprov addDistributionListMember work@ourcompany.com #{user}@ourcompany.com"
system "zmmailbox -z -m #{user}@ourcompany.com createMountpoint --color blue --view appointment --flags '#' \"/Our Company Company Calendar\" jack@ourcompany.com \"/Our Company Company Calendar\""
system "zmmailbox -z -m #{user}@ourcompany.com createMountpoint --color blue --view contact \"/Our Company Internal Contacts\" jack@ourcompany.com \"/Contacts/Our Company Internal Contacts\""
system "zmmailbox -z -m #{user}@ourcompany.com createMountpoint --color blue --view contact \"/Corporate Contacts\" sales@ourcompany.com \"/Sales Contacts\"" It's used from the command line as "ruby ThisScript.rb UsernameToAddStuffTo"
The first "system" command adds the user to a distribution list, the second adds our company calendar to their account and marks it visible by default, the third adds our Internal contacts to their account, and the fourth adds our sales contacts to their account.
The basic syntax structure for zmmailbox as shown for the 2nd, 3rd, and 4th "System" command is
ShareNameShownToUser ,
OriginalShareHolderUser,
NameAsMountedForOriginalUser
Hope this helps get you started!