Set-WebServicesVirtualDirectory
适用于: Exchange Server 2007 SP3, Exchange Server 2007 SP2, Exchange Server 2007 SP1
上一次修改主题: 2011-06-21
使用 Set-WebServicesVirtualDirectory cmdlet,可以修改安装了客户端访问服务器角色的 Exchange 2007 计算机上的现有 Exchange Web 服务虚拟目录。
语法
Set-WebServicesVirtualDirectory -Identity <VirtualDirectoryIdParameter> [-BasicAuthentication <$true | $false>] [-Confirm [<SwitchParameter>]] [-DigestAuthentication <$true | $false>] [-DomainController <Fqdn>] [-ExternalUrl <Uri>] [-InternalNLBBypassUrl <Uri>] [-InternalUrl <Uri>] [-WhatIf [<SwitchParameter>]] [-WindowsAuthentication <$true | $false>]
Set-WebServicesVirtualDirectory [-BasicAuthentication <$true | $false>] [-Confirm [<SwitchParameter>]] [-DigestAuthentication <$true | $false>] [-DomainController <Fqdn>] [-ExternalUrl <Uri>] [-Instance <ADWebServicesVirtualDirectory>] [-InternalNLBBypassUrl <Uri>] [-InternalUrl <Uri>] [-WhatIf [<SwitchParameter>]] [-WindowsAuthentication <$true | $false>]
详细说明
使用 Set-WebServicesVirtualDirectory cmdlet,可以修改 Exchange 2007 客户端访问服务器上的现有 Exchange Web 服务虚拟目录。
![]() |
---|
如果拥有一组负载平衡的客户端访问服务器,则运行该 cmdlet 时,无需指定每台服务器的名称。只需使用网络负载平衡服务器中的一台服务器的名称即可。 |
若要运行 Set-WebServicesVirtualDirectory cmdlet,必须为您使用的帐户委派 Exchange Server Administrator 角色以及目标服务器的本地 Administrators 组成员身份。
有关权限、角色委派以及管理 Microsoft Exchange Server 2007 所需权限的详细信息,请参阅权限注意事项。
参数
参数 | 必需 | 类型 | 说明 |
---|---|---|---|
Identity |
必需 |
Microsoft.Exchange.Configuration.Tasks.VirtualDirectoryIdParameter |
此参数指定虚拟目录的名称。还可以指定一个通配符代替默认网站。 |
BasicAuthentication |
可选 |
System.Boolean |
此参数指定是否对 Exchange Web 服务虚拟目录启用了基本身份验证。此参数可以与 FormsAuthentication、DigestAuthentication 和 WindowsAuthentication 一起使用。 |
Confirm |
可选 |
System.Management.Automation.SwitchParameter |
Confirm 参数将导致命令暂停处理,并且需要您在继续处理之前确认该命令将执行的操作。不必为 Confirm 参数指定值。 |
DigestAuthentication |
可选 |
System.Boolean |
此参数指定是否对虚拟目录启用了摘要式身份验证。 |
DomainController |
可选 |
Microsoft.Exchange.Data.Fqdn |
若要指定用于从 Active Directory 目录服务检索数据域控制器的完全限定的域名 (FQDN),请在 cmdlet 中包含 DomainController 参数。 |
ExternalUrl |
可选 |
System.Uri |
此参数指定将用来连接到防火墙外部的 Exchange 服务器的主机名。如果使用安全套接字层 (SSL),则此设置也很重要。 |
Instance |
可选 |
Microsoft.Exchange.Data.Directory.SystemConfiguration.ADWebServicesVirtualDirectory |
使用 Instance 参数可以将整个对象传递给此 cmdlet 以进行处理。 |
InternalNLBBypassUrl |
可选 |
System.Uri |
即使客户端访问服务器在网络负载平衡器 (NLB) 后面,此参数也会指定客户端服务器的 URL。 |
InternalUrl |
可选 |
System.Uri |
此参数指定从防火墙内进行连接的 Exchange 服务器的主机名。如果使用 SSL,则此设置也很重要。 |
WhatIf |
可选 |
System.Management.Automation.SwitchParameter |
WhatIf 参数指示命令模拟针对对象执行的操作。通过使用 WhatIf 参数,您可以查看要发生的更改,而不必应用任何这些更改。您不必使用 WhatIf 参数指定值。 |
WindowsAuthentication |
可选 |
System.Boolean |
此参数指定是否允许对 Exchange Web 服务虚拟目录进行 Windows 集成身份验证。 |
输入类型
返回类型
错误
错误 | 说明 |
---|---|
|
|
异常
异常 | 说明 |
---|---|
|
|
示例
以下代码示例将“Contoso”服务器上名为“EWS”的虚拟目录的身份验证方法设置为基本身份验证。此代码示例还设置了此虚拟目录的外部 URL 和内部 URL。
第二个代码示例使用通配符替代“default Web site”。
Set-WebServicesVirtualDirectory -Identity Contoso\EWS(default web site)-ExternalUrl https://www.contoso.com/EWS/exchange.asmx - BasicAuthentication $true InternalUrl https://contoso.internal.com/EWS/webservices.aspx
Set-WebServicesVirtualDirectory -Identity Contoso\EWS* -ExternalUrl https://www.contoso.com/ews/exchange.asmx