Saturday, July 19, 2008

Exchange2007: Offline Address Book

Databases:


New-GlobalAddressList -Name 'Shaw' -IncludedRecipients 'AllRecipients' -ConditionalCompany 'shaw'
Update-GlobalAddressList Shaw
New-GlobalAddressList -Name 'Telus' -IncludedRecipients 'AllRecipients' -ConditionalCompany 'Telus'
Update-GlobalAddressList Telus
New-GlobalAddressList -Name 'Rogers' -IncludedRecipients 'AllRecipients' -ConditionalCompany 'Rogers'
Update-GlobalAddressList Rogers

Modify the definition of Default Global Address List by adsiedit.msc


The Default Global Address List includes all recipients in default mailbox database.


Both attributes of msExchQueryFilter and PurportedSearch:


(&(&(mailNickname=*) (homeMDB=CN=Mailbox Database,CN=First Storage Group,CN=InformationStore,CN=USA,CN=Servers,CN= Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=Terrace,DC=com)) ((objectClass=user)(objectClass=contact)(objectClass=msExchSystemMailbox)(objectClass=msExchDynamicDistributionList)(objectClass=group)(objectClass=publicFolder)))

Update-GlobalAddressList 'Default Global Address List'
The default value of PurportedSeach is:
(&(mailNickname=*)((objectClass=user)(objectClass=contact)(objectClass=msExchSystemMailbox)(objectClass=msExchDynamicDistributionList)(objectClass=group)(objectClass=publicFolder)))
note: the pipe operator disappears. The blog site eats it.

Before you configure a outlook client, I restore the default value of PurportedSearch. If you don't, the Outlook client cannot find the user name in the default address list unless the user is from the default mailbox database. After the outlook client is configured, I set the customized settings.
If I could find a way to set up a OUTLOOK Client without looking up the default global address list, then the multiple global address lists will work.
What I do? new mailbox users are created in Default mailbox store. After they are set up in outlook, I move them to their own mailbox stores.

You can do the similiar modification for Shaw, Telus, and Rogers global address list, so Shaw global address list includes all recipients in Shaw Database.

New-AddressList -Name 'ShawAddress' -IncludedRecipients 'AllRecipients' -ConditionalCompany 'Shaw' -Container '\'

Update-AddressList 'ShawAddress'

New-AddressList -Name 'RogersAddress' -IncludedRecipients 'AllRecipients' -ConditionalCompany 'Rogers' -Container '\'

Update-AddressList 'RogersAddress'

New-AddressList -Name 'TelusAddress' -IncludedRecipients 'AllRecipients' -ConditionalCompany 'Telus' -Container '\'

Update-AddressList 'TelusAddress'

new-OfflineAddressBook -Name 'TelusOfflineAddress' -Server 'USA' -AddressLists '\TelusAddress' -PublicFolderDistributionEnabled $true -VirtualDirectories 'USA\OAB (Default Web Site)'

new-OfflineAddressBook -Name 'ShawOfflineAddress' -Server 'USA' -AddressLists '\ShawAddress' -PublicFolderDistributionEnabled $true -VirtualDirectories 'USA\OAB (Default Web Site)'

new-OfflineAddressBook -Name 'RogersOfflineAddress' -Server 'USA' -AddressLists '\RogersAddress' -PublicFolderDistributionEnabled $true -VirtualDirectories 'USA\OAB (Default Web Site)'

Update-OfflineAddressBook 'TelusOfflineAddress'

Update-OfflineAddressBook 'ShawOfflineAddress'

Update-OfflineAddressBook 'RogersOfflineAddress'

Update-OfflineAddressBook 'Default Offline Address Book'

Set-MailboxDatabase -Identity 'Mailbox database' -OfflineAddressBook 'Default Offline Address Book'
Set-MailboxDatabase -Identity 'Shaw database' -OfflineAddressBook 'ShawOfflineAddress'
Set-MailboxDatabase -Identity 'Telus database' -OfflineAddressBook 'TelusOfflineAddress'
Set-MailboxDatabase -Identity 'Rogers database' -OfflineAddressBook 'RogersOfflineAddress'

Download offline address from Outlook;

Tools-Send/Receive--Download Address Book
=====
I created Offline Address Book based on the customized Global Address List, such Shaw, Telus, and rogers. Outlook clients don't use them.