New-AddressList (RTM)

 

适用于: Exchange Server 2007

上一次修改主题: 2007-06-05

使用 New-AddressList cmdlet 可以新建地址列表,并将它应用于收件人。

语法

New-AddressList -Name <String> [-ConditionalCompany <MultiValuedProperty>] [-ConditionalCustomAttribute1 <String>] [-ConditionalCustomAttribute10 <String>] [-ConditionalCustomAttribute11 <String>] [-ConditionalCustomAttribute12 <String>] [-ConditionalCustomAttribute13 <String>] [-ConditionalCustomAttribute14 <String>] [-ConditionalCustomAttribute15 <String>] [-ConditionalCustomAttribute2 <String>] [-ConditionalCustomAttribute3 <String>] [-ConditionalCustomAttribute4 <String>] [-ConditionalCustomAttribute5 <String>] [-ConditionalCustomAttribute6 <String>] [-ConditionalCustomAttribute7 <String>] [-ConditionalCustomAttribute8 <String>] [-ConditionalCustomAttribute9 <String>] [-ConditionalDepartment <MultiValuedProperty>] [-ConditionalStateOrProvince <MultiValuedProperty>] [-Container <AddressListIdParameter>] [-DisplayName <String>] [-DomainController <Fqdn>] [-IncludedRecipients <Nullable>] [-TemplateInstance <PSObject>]

New-AddressList -Name <String> [-Container <AddressListIdParameter>] [-DisplayName <String>] [-DomainController <Fqdn>] [-RecipientFilter <String>] [-TemplateInstance <PSObject>]

详细说明

若要运行 New-AddressList cmdlet,必须为您使用的帐户委派以下角色:

  • Exchange 组织管理员角色

有关管理 Microsoft Exchange Server 2007 所需的权限、角色委派以及权利的详细信息,请参阅权限注意事项

参数

参数 必需 类型 说明

Name

必需

System.String

Name 参数指定新地址列表的期望名称。该名称不能超过 64 个字符,并且不能包含换行符或反斜线 (\)。

ConditionalCompany

可选

Microsoft.Exchange.Data.MultiValuedProperty

ConditionalCompany 参数是用于指定公司的筛选器。其公司属性与为此参数所输入的值相匹配的所有收件人都将包括在地址列表中。可以使用以逗号分隔的多个值。如果使用 RecipientFilter 参数,则不能使用此参数。必须使用 RecipientFilter 参数或下列筛选器参数之一:

  • ConditionalCompany

  • ConditionalDepartment

  • ConditionalStateOrProvince

  • IncludedRecipients

ConditionalCustomAttribute1

可选

System.String

ConditionalCustomAttribute1 参数指定自定义属性。可以使用这些属性存储其他信息。

ConditionalCustomAttribute10

可选

System.String

ConditionalCustomAttribute10 参数指定自定义属性。可以使用这些属性存储其他信息。

ConditionalCustomAttribute11

可选

System.String

ConditionalCustomAttribute11 参数指定自定义属性。可以使用这些属性存储其他信息。

ConditionalCustomAttribute12

可选

System.String

ConditionalCustomAttribute12 参数指定自定义属性。可以使用这些属性存储其他信息。

ConditionalCustomAttribute13

可选

System.String

ConditionalCustomAttribute13 参数指定自定义属性。可以使用这些属性存储其他信息。

ConditionalCustomAttribute14

可选

System.String

ConditionalCustomAttribute14 参数指定自定义属性。可以使用这些属性存储其他信息。

ConditionalCustomAttribute15

可选

System.String

ConditionalCustomAttribute15 参数指定自定义属性。可以使用这些属性存储其他信息。

ConditionalCustomAttribute2

可选

System.String

ConditionalCustomAttribute2 参数指定自定义属性。可以使用这些属性存储其他信息。

ConditionalCustomAttribute3

可选

System.String

ConditionalCustomAttribute3 参数指定自定义属性。可以使用这些属性存储其他信息。

ConditionalCustomAttribute4

可选

System.String

ConditionalCustomAttribute4 参数指定自定义属性。可以使用这些属性存储其他信息。

ConditionalCustomAttribute5

可选

System.String

ConditionalCustomAttribute5 参数指定自定义属性。可以使用这些属性存储其他信息。

ConditionalCustomAttribute6

可选

System.String

ConditionalCustomAttribute6 参数指定自定义属性。可以使用这些属性存储其他信息。

ConditionalCustomAttribute7

可选

System.String

ConditionalCustomAttribute7 参数指定自定义属性。可以使用这些属性存储其他信息。

ConditionalCustomAttribute8

可选

System.String

ConditionalCustomAttribute8 参数指定自定义属性。可以使用这些属性存储其他信息。

ConditionalCustomAttribute9

可选

System.String

ConditionalCustomAttribute9 参数指定自定义属性。可以使用这些属性存储其他信息。

ConditionalDepartment

可选

Microsoft.Exchange.Data.MultiValuedProperty

ConditionalDepartment 参数是用于指定部门的筛选器。其部门属性与为此参数所输入的值相匹配的所有收件人都将包括在地址列表中。可以使用以逗号分隔的多个值。如果使用 RecipientFilter 参数,则不能使用此参数。必须使用 RecipientFilter 参数或下列筛选器参数之一:

  • ConditionalCompany

  • ConditionalDepartment

  • ConditionalStateOrProvince

  • IncludedRecipients

ConditionalStateOrProvince

可选

Microsoft.Exchange.Data.MultiValuedProperty

ConditionalStateOrProvince 参数是用于指定省/市/自治区的筛选器。其 ConditionalStateOrProvince 属性与为此参数输入的值相匹配的所有收件人都将包括在地址列表中。可以使用以逗号分隔的多个值。如果使用 RecipientFilter 参数,则不能使用此参数。必须使用 RecipientFilter 参数或下列筛选器参数之一:

  • ConditionalCompany

  • ConditionalDepartment

  • ConditionalStateOrProvince

  • IncludedRecipients

Container

可选

Microsoft.Exchange.Configuration.Tasks.AddressListIdParameter

Container 参数指定将在其中创建此新地址列表的父地址列表的标识。如果没有指定父地址列表,则会在根“所有地址列表”下面创建地址列表。

DisplayName

可选

System.String

DisplayName 参数指定所期望的地址列表显示名称。如果没有提供显示名,则地址列表的名称还将是显示名称。

DomainController

可选

Microsoft.Exchange.Data.Fqdn

若要指定将此配置更改写入 Active Directory 的域控制器的完全限定的域名 (FQDN),请在命令中包含 DomainController 参数。

IncludedRecipients

可选

System.Nullable

IncludedRecipients 参数是用于指定要包括在地址列表中的收件人类型的筛选器。可以使用一个或多个下列类型:

  • UserMail

  • Resources

  • MailGroups

  • MailContacts

  • AllRecipients

如果使用 RecipientFilter 参数,则不能使用此参数。必须使用 RecipientFilter 参数或下列筛选器参数之一:

  • ConditionalCompany

  • ConditionalDepartment

  • ConditionalStateOrProvince

  • IncludedRecipients

RecipientFilter

可选

System.String

RecipientFilter 参数指定要包含在地址列表中的收件人的筛选器。如果使用了下列筛选器参数中的任何一个,则不能使用此参数:

  • ConditionalCompany

  • ConditionalDepartment

  • ConditionalStateOrProvince

  • IncludedRecipients

必须使用此参数,或者使用以上筛选器参数之一。

有关可筛选属性的详细信息,请参阅 -RecipientFilter 参数的可筛选属性

TemplateInstance

可选

System.Management.Automation.PSObject

将现有对象提供给 TemplateInstance 参数时,该命令将使用该对象的配置在本地服务器或目标服务器上创建完全重复的对象。

输入类型

返回类型

错误

错误 说明

 

 

异常

异常 说明

 

 

示例

第一个示例显示如何创建名为 MyAddressList 的新地址列表。其中包括身份为邮箱用户并且将 StateOrProvince 参数设置为 Washington 或 Oregon 的收件人。

第二个示例显示如何创建名为 MyAddressList2 的新地址列表,其中包括将 ConditionalStateOrProvince 参数设置为 Washington 的邮箱。

New-AddressList -Name MyAddressList -RecipientFilter {((RecipientType -eq 'UserMailbox') -and ((StateOrProvince -eq 'Washington') -or (StateOrProvince -eq 'Oregon')))}
New-AddressList -Name MyAddressList2 -ConditionalStateOrProvince Washington -IncludedRecipients MailboxUsers