连接到 Exchange Server 2003 SP1 服务器时有时会出现“访问被拒绝”错误。用于连接的 cmd-let 是:
Set-ExecutionPolicy RemoteSigned
$sessOpt = New-SessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck
$credent = Get-Credential
$session = New-PSSession -SessionOption $sessOpt -Credential $cred -Authentication Kerberos -ConfigurationName Microsoft.Exchange -ConnectionURI http://ex1/Powershell
错误:
System.Management.Automation.Remoting.PSRemotingTransportException: Connecting to remote server ex1.domain.com failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic
上述错误在尝试几次后都会抛出,有时它能正常工作。同样的循环重复。无法找到为什么在尝试几次后访问被拒绝。在不同的机器上测试,结果相同。