由于exchange并没有提供全面的图形界面进行参数查看和修改,通过命令行查看和修改相关的配置信息就成了唯一的有效方式,缺点就是需要属性相关的命令和语法,不属性命令和语法就没办法执行对应的任务了,参考官方文档是一个不错的方式,并对常用的命令和语法进行记录和熟悉。
1. AutodiscoverVirtualDirectory
设置合适的认证方式,方便客户端能够快速与服务器建立连接。
官方命令参考:
1.1 查看认证
Get-AutoDiscoverVirtualDirectory | FL server,*auth*
Server : WIN-IRDSVJO3UTT
InternalAuthenticationMethods : {Basic, WSSecurity}
ExternalAuthenticationMethods : {Basic, WSSecurity}
LiveIdNegotiateAuthentication : False
WSSecurityAuthentication : True
LiveIdBasicAuthentication : False
BasicAuthentication : True
DigestAuthentication : False
WindowsAuthentication : False
OAuthAuthentication : False
AdfsAuthentication : False
1.2 修改OAuthAuthentication为true
Set-AutodiscoverVirtualDirectory -Identity 'Autodiscover (Default Web Site)' -OAuthAuthentication $true
Get-AutoDiscoverVirtualDirectory | FL server,*auth*
Server : WIN-IRDSVJO3UTT
InternalAuthenticationMethods : {Basic, WSSecurity, OAuth}
ExternalAuthenticationMethods : {Basic, WSSecurity, OAuth}
LiveIdNegotiateAuthentication : False
WSSecurityAuthentication : True
LiveIdBasicAuthentication : False
BasicAuthentication : True
DigestAuthentication : False
WindowsAuthentication : False
OAuthAuthentication : True
AdfsAuthentication : False
注意: 'Autodiscover (Default Web Site)',名称需要用引号引起来,目录名和后面的站点之间需要用空格分隔。
1.3 修改OAuthAuthentication为false
Set-AutodiscoverVirtualDirectory -Identity 'Autodiscover (Default Web Site)' -OAuthAuthentication $false
Get-AutoDiscoverVirtualDirectory | FL server,*auth*
Server : WIN-IRDSVJO3UTT
InternalAuthenticationMethods : {Basic, WSSecurity}
ExternalAuthenticationMethods : {Basic, WSSecurity}
LiveIdNegotiateAuthentication : False
WSSecurityAuthentication : True
LiveIdBasicAuthentication : False
BasicAuthentication : True
DigestAuthentication : False
WindowsAuthentication : False
OAuthAuthentication : False
AdfsAuthentication : False
2. WebServicesVirtualDirectory
WebServicesVirtualDirectory是ews协议的虚拟目录。
官方命令参考:
2.1 查看认证方式
Get-WebServicesVirtualDirectory | FL server,*url*,*auth*
Server : WIN-IRDSVJO3UTT
InternalNLBBypassUrl :
InternalUrl : https://mail.otp.com/ews/exchange.asmx
ExternalUrl : https://mail.otp.com/ews/exchange.asmx
CertificateAuthentication :
InternalAuthenticationMethods : {Basic, WSSecurity}
ExternalAuthenticationMethods : {Basic, WSSecurity}
LiveIdNegotiateAuthentication :
WSSecurityAuthentication : True
LiveIdBasicAuthentication : False
BasicAuthentication : True
DigestAuthentication : False
WindowsAuthentication : False
OAuthAuthentication : False
AdfsAuthentication : False
2.2 修改OAuthAuthentication为true
Set-WebServicesVirtualDirectory -Identity 'EWS (Default Web Site)' -OAuthAuthentication $true
Get-WebServicesVirtualDirectory | FL server,*url*,*auth*
Server : WIN-IRDSVJO3UTT
InternalNLBBypassUrl :
InternalUrl : https://mail.otp.com/ews/exchange.asmx
ExternalUrl : https://mail.otp.com/ews/exchange.asmx
CertificateAuthentication :
InternalAuthenticationMethods : {Basic, WSSecurity, OAuth}
ExternalAuthenticationMethods : {Basic, WSSecurity, OAuth}
LiveIdNegotiateAuthentication :
WSSecurityAuthentication : True
LiveIdBasicAuthentication : False
BasicAuthentication : True
DigestAuthentication : Fa