how to create an address book that contains members of 2 address book policies

PLEASE could someone help me ..

We have a multi tenant exchange server with multiple address book policies  (ie, company1, company2)
When I create the new address books these are the commands I use:

New-GlobalAddressList -Name "company1 - GAL" -ConditionalCustomAttribute1 "Company1" -IncludedRecipients MailboxUsers -RecipientContainer ""

New-OfflineAddressBook -Name "Company1" -AddressLists "Company1 - GAL"

New-AddressList -Name "Company1 - All Users" -RecipientFilter "(CustomAttribute1 -eq 'Company1') -and (ObjectClass -eq 'User')" -RecipientContainer ""

New-AddressBookPolicy -Name "Company1" -AddressLists "Southfields - All Users"  -GlobalAddressList "Company1- GAL" -OfflineAddressBook "Company1"

This all works

I do the same for Company 2 etc...

What I need to do is create a addressbook policy called "multipleco" which includes members of the company1 and company 2

Any ideas/help would be appreciated !!
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hasin Ahmed ChoudharyExchange AdministratorCommented:
Thre are two ways based on your requirements.

1) Just create new policy "multipleco" and add all GAL and OAB for company1 and company2.

Any user who is assigned this policy will see address list/OAB list in outlook but segregate as two separate company.

2) You don't want the end user to realize the difference in company's  users and view from outlook side needed as  " All users in single list". then follow below:

New-GlobalAddressList -Name "multipleco- GAL"  -IncludedRecipients MailboxUsers
New-OfflineAddressBook -Name "multipleco- OAB" -AddressLists "multipleco- GAL"

New-AddressList -Name "multipleco - All Users" -RecipientFilter "{(CustomAttribute1 -eq 'Company1') -or (CustomAttribute1 -eq 'Company2')-and (ObjectClass -eq 'User')}"

New-AddressBookPolicy -Name "multipleco" -AddressLists "multipleco - All Users"  -GlobalAddressList "multipleco- GAL" -OfflineAddressBook "multipleco- OAB"
Member_2_7970364Author Commented:
Thanks for this

Option 1 would be the best way

What commands would you recommend to make this new policy ?

Hasin Ahmed ChoudharyExchange AdministratorCommented:
TIps: All parameters will accept multiple values by separating it with comma","
         Add as many items you want.

Here you go.

New-AddressBookPolicy -Name "multipleco" -AddressLists "Company1 - All Users","Company2 - All Users"  -GlobalAddressList "Company1- GAL","Company1- GAL"   -OfflineAddressBook "Company1","Company2"
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Member_2_7970364Author Commented:
Thanks, this is the command I used:

[PS] C:\Windows\system32>New-AddressBookPolicy -Name "Caldermultipleco" -AddressLists "C1 - All Users","P1 - All Users", "C1 - All Contacts", "P1 - All Contacts", "C1 - All Groups", "P1 - All Groups"  -GlobalAddressList "C1 - GAL","P1 - GAL"  -OfflineAddressBook "P","C"

I tried this and got this error:

Cannot process argument transformation on parameter 'GlobalAddressList'. Cannot convert the
"System.Collections.ArrayList" value of type "System.Collections.ArrayList" to type
    + CategoryInfo          : InvalidData: (:) [New-AddressBookPolicy], ParameterBindin...mationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,New-AddressBookPolicy
    + PSComputerName        :

All groups are spelt correctly

Any suggestions ?  Thanks Mike
Hasin Ahmed ChoudharyExchange AdministratorCommented:
I forget that there can be only one GAL per policy:

The GlobalAddressList parameter specifies the identity of the GAL that will be used by mailbox users who are assigned this address book policy. You can specify only one GAL for each address book policy.

Create one common GAl and add it to above cmd.
Eg:  New-GlobalAddressList -Name "multipleco- GAL"  -IncludedRecipients MailboxUsers

Use this link to apply the filter as required.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Member_2_7970364Author Commented:
Thanks for help

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.