后来改windows powershell尝试在exchange本机上尝试连接到exchange,报以下错误
PS WSMan:\localhost\Client> $UserCredential = Get-Credential
PS WSMan:\localhost\Client> $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://a02.aoqe.com/powershell/ -Authentication Basic -Credential $UserCredential
New-PSSession : [a02. aoqe.com] 连接到远程服务器 a02. aoqe.com 失败,并显示以下错误消息: 拒绝访问。 有关详细信息,请参阅 about_Remote_Troubleshooting 帮助主题。
所在位置 行:1 字符: 12
+ $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri ht ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : AccessDenied,PSSessionOpenFailed
exchange iis PowerShell 应用程序的身份验证模式设为启用基本身份认证,winrm也修改了相关的配置
另,$UserCredential = Get-Credential的时候,输入的用户名的格式到底是什么啊,我现在输入的是adm@aoqe.com