Support Forums

Importing Companies…
 
Notifications
Clear all

Importing Companies & Users does not create address lists or policies

4 Posts
2 Users
0 Likes
784 Views
Posts: 0
Topic starter
(@Anonymous)
Joined: 1 second ago

I have imported seven companies, and their users into a new CP installation. All seemed to go well, with a little trial and error.  But I have noticed no address lists, OABs or address book policies have been created for the imported companies.  Not sure if this is by design or because I messed a step.

Can you please provide a full list of which lists, OABs and policies should have been created, and if possible the powershell script you use to create them. 

So far I have found the <Code> GAL Global Address List and the <Code> OAL Offline Address Lists. But I have a feeling there are many more.

Finally, is this by design or did I miss a step?

Topic Tags
3 Replies
Posts: 1559
Admin
(@jdixon)
Noble Member
Joined: 9 years ago

This is kind of by design because we typically charge to migrate customers into CloudPanel to make sure there are no issues. We provide some documentation ( https://kb.knowmoreit.com/docs/migration/migrate-objects-to-cloudpanel/) but it does not contain everything since prior environments could be so vastly different.

If you go to the CloudPanel setup page and then Microsoft Exchange -> Advanced tab, you will see the format CloudPanel will create the lists when you enable a company for Exchange. For example you should see the defaults: {0} GAL, {0} ABP, {0} OAL, {0} – All Users, {0} – All Contacts, {0} – All Rooms, {0} – All Groups which the {0} will be replaced with the company code of the company. We often find that importing a company non-exchange enabled and then enabling Exchange results in the best output because that will create all the lists for you and then you can associate the users with the correct Address Book Policy and GAL.

Reply
Posts: 0
Topic starter
(@Anonymous)
Joined: 1 second ago

Many thanks for your reply, and the link provided.  I had used that link to get as far as I did.

Based on your settings, I think I have worked out what lists etc. need to be created.  I created the Powershell commands below to create all the missing lists.  Could you please take a quick look and see if I have missed anything important.

Also, I noticed there was a security group created when I create a company manually, but do not see what it is used for. It’s called ExchangeSecurity@CODE in the Exchange OU of the company.  Do I need to create this? and if so, where is it used?

Many thanks for your help, and for such a great product.

$code = "KR"

New-GlobalAddressList -Name "$code GAL" -RecipientFilter "((Alias -ne `$null) -and (CustomAttribute1 -eq '$code'))"

New-AddressList -Name "$code - All Users" -RecipientFilter "((RecipientType -eq 'UserMailbox') -and (CustomAttribute1 -eq '$code'))" -DisplayName "All Users"

New-AddressList -Name "$code - All Contacts" -RecipientFilter "((((RecipientType -eq 'MailContact') -or (RecipientType -eq 'MailUser'))) -and (CustomAttribute1 -eq '$code'))" -DisplayName "All Contacts"

New-AddressList -Name "$code - All Groups" -RecipientFilter "((((RecipientType -eq 'MailUniversalDistributionGroup') -or (RecipientType -eq 'DynamicDistributionGroup'))) -and (CustomAttribute1 -eq '$code'))" -DisplayName "All Groups"

New-AddressList -Name "$code - All Rooms" -RecipientFilter '((((Alias -ne $null) -and (((RecipientDisplayType -eq ''ConferenceRoomMailbox'') -or (RecipientDisplayType -eq ''SyncedConferenceRoomMailbox''))))) -and (CustomAttribute1 -eq ''$code''))' -DisplayName "All Rooms"

New-OfflineAddressBook -Name "$code OAL" -AddressLists "$code GAL"

New-AddressBookPolicy -Name "$code ABP" -AddressLists "\$code - All Contacts","\$code - All Groups","\$code - All Users" -RoomList "\$code - All Rooms" -OfflineAddressBook "\$code OAL" -GlobalAddressList "\$code GAL"

$FilterABP = Get-Mailbox -Filter "CustomAttribute1 -eq '$code'"

$FilterABP | foreach {Set-Mailbox -Identity $_.identity -AddressBookPolicy "$code ABP"}
Reply
Posts: 1559
Admin
(@jdixon)
Noble Member
Joined: 9 years ago

That looks correct. The security group is used for public folders (if you end up using public folders). Also instead of using your powershell scripts you could import the company as not Exchanged enabled, then enable Exchange in CloudPanel which would create everything for you.

Then you can simply run:

$FilterABP = Get-Mailbox -Filter "CustomAttribute1 -eq '$code'"
$FilterABP | foreach {Set-Mailbox -Identity $_.identity -AddressBookPolicy "$code ABP"}
Reply
Share: