RSS

How to 迁移address list和EAP filter 到exchange server 2007

08 Apr

因为exchange server 2003 以及早期版本使用的address list 和eap filter 和exchange server 2007 完全不同,所以当你编辑的时候会发现,有报错出现。

一旦你想要编辑,就会报上面的错误。

升级到exchange2007后default policy地址簿无法编辑的解决办法 这篇文档中我曾经解决了该问题。最近发现还是有一些问题存在,下面有一个不错的脚本能快速的迁移address list和EAP filter 到exchange server 2007版本

# UpgradeDefaultFilters.ps1
# This script will upgrade the default set of legacy Exchange 2003 filters to Exchange 2007 filter format. 
#  Filters affected include:
#   Recient Policy
#    - Default Policy
#   Global Address List
#    - Default Global Address List
#   Address Lists#    - All Users
#    - All Contacts
#    - All Groups
#    - All Public Folders 
 
##########################
##UPgrade Address List to Exchange server 2007 version
 
#Global Address List
Get-GlobalAddressList | Set-GlobalAddressList -ForceUpgrade
 
#Address List
Get-AddressList  | Set-AddressList -ForceUpgrade
 
##########################
##change recipient filter
 
# Default Policy
Set-EmailAddressPolicy "Default Policy" –IncludedRecipients AllRecipients 
 
# Default Global Address List
Set-GlobalAddressList "Default Global Address List" -RecipientFilter {(Alias -ne $null -and (ObjectClass -eq 'user' -or ObjectClass -eq 'contact' -or ObjectClass -eq 'msExchSystemMailbox' -or ObjectClass -eq 'msExchDynamicDistributionList' -or ObjectClass -eq 'group' -or ObjectClass -eq 'publicFolder'))} 
 
# All Users
Set-AddressList "All Users" –IncludedRecipients MailboxUsers 
 
# All Contacts
Set-AddressList "All Contacts" –IncludedRecipients MailContacts 
 
# All Groups
Set-AddressList "All Groups" –IncludedRecipients MailGroups 
 
# All Public Folders
Set-AddressList "Public Folders" –RecipientFilter { RecipientType -eq 'PublicFolder' }

 

这下运行一次脚本就搞定了。

请注意:本脚本仅作为学习之用,运行脚本前请你先测试。

Advertisements
 
 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: