New-EcpVirtualDirectory

此 cmdlet 仅适用于本地 Exchange。

使用 New-EcpVirtualDirectory cmdlet 创建 Exchange 控制面板 (ECP) 在 Microsoft Exchange 服务器上的 Internet Information Services (IIS) 中使用的虚拟目录。 这是在组织中安装 Exchange 时 Microsoft Exchange Server 安装程序运行的命令。 ECP 虚拟目录管理 Exchange 管理中心。

Exchange Server 2010 中引入了 ECP Web 管理界面。 在 Exchange Server 2013 和 Exchange Server 2016 中,EAC 虚拟目录和相应的管理 cmdlet 仍在名称中使用 ECP。 可以使用这些 cmdlet 管理 Exchange 2010、Exchange 2013 和 Exchange 2016 服务器上的 ECP 虚拟目录。

有关以下语法部分的参数设置的详细信息,请参阅 Exchange cmdlet 语法。

语法

Default (默认值)

New-EcpVirtualDirectory
    [-AppPoolId <String>]
    [-Confirm]
    [-DomainController <Fqdn>]
    [-ExtendedProtectionFlags <MultiValuedProperty>]
    [-ExtendedProtectionSPNList <MultiValuedProperty>]
    [-ExtendedProtectionTokenChecking <ExtendedProtectionTokenCheckingMode>]
    [-ExternalUrl <Uri>]
    [-InternalUrl <Uri>]
    [-Path <String>]
    [-Role <VirtualDirectoryRole>]
    [-Server <ServerIdParameter>]
    [-WebSiteName <String>]
    [-WhatIf]
    [<CommonParameters>]

说明

您必须先获得权限,然后才能运行此 cmdlet。 尽管本文列出了 cmdlet 的所有参数,但如果分配给你的权限中未包含某些参数,则可能无权访问这些参数。 若要查找在贵组织中运行任何 cmdlet 或参数所需的权限,请参阅 Find the permissions required to run any Exchange cmdlet。

示例

示例 1

New-EcpVirtualDirectory -Server SERVER01 -ExternalURL https://mail.contoso.com/ecp -InternalURL https://mail.contoso.com/ecp

此示例在名为 Server01 的 Exchange 服务器上创建 ECP 虚拟目录。

参数

-AppPoolId

适用:Exchange Server 2010、Exchange Server 2013、Exchange Server 2016、Exchange Server 2019、Exchange Server SE

AppPoolId 参数设置用于运行 ECP 虚拟目录的 IIS 应用程序池。 我们建议您保留此参数的默认设置。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Confirm

适用:Exchange Server 2010、Exchange Server 2013、Exchange Server 2016、Exchange Server 2019、Exchange Server SE

Confirm 开关指定是否显示确认提示。 此开关对 cmdlet 有何影响取决于 cmdlet 在继续操作前是否需要确认。

  • 破坏性 cmdlet(例如 Remove-* cmdlets)内置有暂停,可强制要求先确认命令,然后再继续操作。 对于这些 cmdlet,您可以使用此确切语法跳过确认提示:-Confirm:$false。
  • 其他大多数 cmdlet(例如 New-* 和 Set-* cmdlet)都没有内置暂停。 对于这些 cmdlet,在不带值的情况下指定“确认”开关会引入一个暂停,从而强制你在继续之前确认命令。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:cf

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-DomainController

适用:Exchange Server 2010、Exchange Server 2013、Exchange Server 2016、Exchange Server 2019、Exchange Server SE

DomainController 参数指定此 cmdlet 从 Active Directory 读取数据或向其写入数据时使用的域控制器。 可以使用完全限定的域名 (FQDN) 来标识域控制器。 例如,dc01.contoso.com。

参数属性

类型:Fqdn
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-ExtendedProtectionFlags

适用:Exchange Server 2010、Exchange Server 2013、Exchange Server 2016、Exchange Server 2019、Exchange Server SE

ExtendedProtectionFlags 参数指定虚拟目录上身份验证扩展保护的自定义设置。 有效值包含:

  • 无:这是默认设置。
  • AllowDotlessSPN:如果要使用服务主体名称 (SPN) 不包含 FQDN 的值,则必需 (例如 HTTP/ContosoMail 而不是 HTTP/mail.contoso.com) 。 您可以使用 ExtendedProtectionSPNList 参数指定 SPN。 此设置降低了身份验证扩展保护的安全性,因为无点证书并不唯一,因此无法确保客户端到代理的连接是通过安全通道建立的。
  • NoServiceNameCheck:不会检查 SPN 列表来验证通道绑定令牌。 此设置会降低针对身份验证的扩展保护的安全性。 通常,建议不使用此设置。
  • 代理:代理服务器负责终止 TLS 通道。 若要使用此设置,需要使用 ExtendedProtectionSPNList 参数注册一个 SPN。
  • ProxyCoHosting:HTTP 和 HTTPS 流量可能正在访问虚拟目录,并且代理服务器至少位于某些客户端和 Exchange 服务器上的客户端访问服务之间。

参数属性

类型:MultiValuedProperty
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-ExtendedProtectionSPNList

适用:Exchange Server 2010、Exchange Server 2013、Exchange Server 2016、Exchange Server 2019、Exchange Server SE

ExtendedProtectionSPNList 参数指定有效的服务主体名称列表 (SPN,) 如果你在虚拟目录上使用针对身份验证的扩展保护。 有效值包含:

  • $null:此值为默认值。
  • 单个 SPN 或逗号分隔的有效 SPN 列表:SPN 值格式为 Protocol\FQDN。 例如,HTTP/mail.contoso.com。 若要添加不是 FQDN (的 SPN(例如 HTTP/ContosoMail) ),还需要将 AllowDotlessSPN 值用于 ExtendedProtectionFlags 参数。

参数属性

类型:MultiValuedProperty
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-ExtendedProtectionTokenChecking

适用:Exchange Server 2010、Exchange Server 2013、Exchange Server 2016、Exchange Server 2019、Exchange Server SE

ExtendedProtectionTokenChecking 参数指定是否将身份验证扩展保护用于到虚拟目录的客户端连接。 有效值包含:

  • 无:身份验证扩展保护不用于客户端到虚拟目录的连接。 此值为默认值。
  • 允许:如果客户端和服务器都支持,则将“身份验证扩展保护”用于客户端到虚拟目录的连接。
  • 需要:客户端连接到虚拟目录需要身份验证扩展保护。 如果客户端或服务器不支持,则连接失败。 此值还需要 ExtendedProtectionSPNList 参数的服务主体名称 (SPN) 值。

注意:如果 Exchange 服务器前面的代理服务器终止客户端到代理传输层安全 (TLS) 通道,则值“允许”或“需要”需要一个或多个 SPN 值用于 ExtendedProtectionSPNList 参数。

参数属性

类型:ExtendedProtectionTokenCheckingMode
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-ExternalUrl

适用:Exchange Server 2010、Exchange Server 2013、Exchange Server 2016、Exchange Server 2019、Exchange Server SE

ExternalURL 参数指定从防火墙外部连接到虚拟目录的 URL。

当连接通过传输层安全性 (TLS) 加密时,此参数的值非常重要。

需要为此参数指定一个值,以允许自动发现服务返回 ECP 虚拟目录的 URL。

参数属性

类型:Uri
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-InternalUrl

适用:Exchange Server 2010、Exchange Server 2013、Exchange Server 2016、Exchange Server 2019、Exchange Server SE

InternalURL 参数指定从防火墙内部连接到虚拟目录的 URL。

当连接通过传输层安全性 (TLS) 加密时,此参数的值非常重要。

需要为此参数指定一个值,以允许自动发现服务返回 ECP 虚拟目录的 URL。

参数属性

类型:Uri
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Path

适用:Exchange Server 2010、Exchange Server 2013、Exchange Server 2016、Exchange Server 2019、Exchange Server SE

Path 参数设置 ECP 虚拟目录的文件系统路径。 使用此参数时应格外小心,并仅在使用除默认值以外的其他文件系统路径时使用。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Role

适用:Exchange Server 2013、Exchange Server 2016、Exchange Server 2019、Exchange Server SE

角色参数指定虚拟目录的配置。 有效值包含:

  • ClientAccess:为邮箱服务器上的客户端访问 (前端) 服务配置虚拟目录。
  • 邮箱:为邮箱服务器上的后端服务配置虚拟目录。

客户端连接从客户端访问服务代理到本地或远程邮箱服务器上的后端服务。 客户端不直接连接到后端服务。

参数属性

类型:VirtualDirectoryRole
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Server

适用:Exchange Server 2010、Exchange Server 2013、Exchange Server 2016、Exchange Server 2019、Exchange Server SE

Server 参数指定托管虚拟目录的 Exchange 服务器。 可以使用唯一标识该服务器的任何值。 例如:

  • 名称
  • FQDN
  • 可分辨名称 (DN)
  • ExchangeLegacyDN

您不能远程创建 ECP 虚拟目录。 只能在本地计算机上创建 ECP 虚拟目录。

参数属性

类型:ServerIdParameter
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:True
来自管道的值(按属性名称):True
来自剩余参数的值:False

-WebSiteName

适用:Exchange Server 2010、Exchange Server 2013、Exchange Server 2016、Exchange Server 2019、Exchange Server SE

WebSiteName 参数指定用于创建 ECP 虚拟目录的 IIS 网站的名称。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-WhatIf

适用:Exchange Server 2010、Exchange Server 2013、Exchange Server 2016、Exchange Server 2019、Exchange Server SE

WhatIf 开关显示命令执行的操作,而无需进行任何更改。 不必为此开关指定值。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:WI

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

CommonParameters

此 cmdlet 支持以下常用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。

输入

Input types

若要了解此 cmdlet 接受的输入类型,请参阅 cmdlet 的输入和输出类型。 如果 cmdlet 的"输入类型"字段为空,则表明此 cmdlet 不接受输入数据。

输出

Output types

若要了解此 cmdlet 接受的返回类型(亦称为"输出类型"),请参阅 cmdlet 的输入和输出类型。 如果"输出类型"字段为空,则表明此 cmdlet 不返回任何数据。