PowerShell help with Exchange 2010 AddressBook

easyworks
easyworks used Ask the Experts™
on
So I have an SBS 2011 with Exchange 2010 in a company that is trying to keep 2x different groups separate in the contact list from seeing each other. I know in exchange 2013 how to do this, but having problems figuring out how to do it in 2010. In 2013 I would do...
New-AddressList -Name "CompanyName_Users_DGs" -RecipientFilter {((RecipientType -eq 'UserMailbox') -or (RecipientType -eq "MailUniversalDistributionGroup") -or (RecipientType -eq "DynamicDistributionGroup")) -and (CustomAttribute1 -eq "CompanyName")}

Open in new window

New-AddressList -Name CompanyName_Rooms -RecipientFilter {(Alias -ne $null) -and (CustomAttribute1 -eq "CompanyName")-and (RecipientDisplayType -eq 'ConferenceRoomMailbox') -or (RecipientDisplayType -eq 'SyncedConferenceRoomMailbox')}

Open in new window

New-GlobalAddressList -Name "GAL_CompanyName" -RecipientFilter {(CustomAttribute1 -eq "CompanyName")}

Open in new window

New-OfflineAddressBook -Name "OAB_CompanyName" -AddressLists "GAL_CompanyName"

Open in new window

New-AddressBookPolicy -Name "ABP_CompanyName" -AddressLists "CompanyName_Users_DGs","CompanyName_Rooms" -OfflineAddressBook "\OAB_CompanyName" -GlobalAddressList "\GAL_CompanyName" -RoomList "\CompanyName_Rooms"

Open in new window

Get-Mailbox -resultsize unlimited | where {$_.CustomAttribute1 -eq "CompanyName"} | Set-Mailbox -AddressBookPolicy "ABP_CompanyName"

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
AlanConsultant

Commented:
Hi,

You don't say, but I am guessing that perhaps one of those commands is not working on the Exchange 2010 box?

Is that correct?

Alan.
Found my problem was I was copying and pasting into word to make replace changes and there was a hidden special character... found out when I copied it to notepad.

Author

Commented:
It appears though when i get to...
New-AddressBookPolicy -Name "ABP_MyCompany" -AddressLists "MyCompany_Users_DGs","MyCompany_Rooms" -OfflineAddressBook "\OAB_MyCompany" -GlobalAddressList "\GAL_MyCompany" -RoomList "\MyCompany_Rooms"

Open in new window


New-AddressBookPolicy is not a recognized as the name of a cmdlet.

Author

Commented:
Nevermind found that the exchange server is running SP1!

Author

Commented:
Resolved my own problem.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial