RSS

case01 创建一个邮件组用于向需要脱机维护的数据库或者群集服务器的所有用户发信

11 Jun

需求: 为了方便管理SCC群集的维护,需要创建一个邮件组用于向需要脱机维护的数据库或者群集服务器的所有用户发信。

解决方案:由于用户可能因为某些原因在数据库之间挪动,所以创建普通的邮件分发组是无法满足需求的。动态分发组正是为了满足这种动态变化的用户组成员而诞生的。本例将创建动态分发组以满足需求。

测试代码为:

   1: New-DynamicDistributionGroup –Name x –OrgnaizationalUnit xx -RecipientFilter { (recipienttype –eq “mailbox”) –and (recipienttypedetails -eq "usermailbox") -and (servername -eq "xxxx") –and (database –eq “DN”)}

分布讲一下:

–Name  DDG的名字

–OrgnaizationalUnit  DDG的存放位置

-RecipientFilter  DDG的筛选器

recipienttype 和recipienttypedetails 的区别请看下图:

 

servername 请使用:

database请使用:

具体代码为:

创建一个在同一数据库上邮件用户合集的动态分发组

   1: new-DynamicDistributionGroup -name "User on DB01" -organizationalunit contoso.com/testou -RecipientFilter { (recipienttypedetails -eq "usermailbox") -and  (database -eq "CN=SG01DB,CN=SG01,CN=InformationStore,CN=VMMBXCLU-02,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=contoso,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=contoso,DC=com")}

创建一个在同一服务器上邮件用户合集的动态分发组

   1: New-DynamicDistributionGroup -Name "User on Server VMMBXCLU" -orgnizationalUnit contoso.com/testou -RecipientFilter { (recipienttypedetails -eq "usermailbox") -and (servername -eq "VMMBXCLU") }

创建好的实例:

更新:批处理

创建server级别筛选的DDG

   1: get-mailboxserver | % { $servername =  $_.name; New-DynamicDistributionGroup "DDG-users-$servername" -organizationalunit" contoso.com/testou -recipientfilter { (recipienttypedetails -eq "usermailbox") -and (servername -eq $servername)} }

创建数据库级别筛选的DDG

   1: get-mailboxdatabase | % {$DBDN = $_.Identity.DistinguishedName; New-DynamicDistributionGroup "DDG-$($_.Name)" -RecipientFilter { (RecipientTypeDetails -eq "usermailbox") -and ( Database -eq $DBDN )  } }

感谢圣火教主的支持~

Advertisements
 
1 Comment

Posted by on June 11, 2009 in Exchange Server

 

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: