创建到 Microsoft Exchange 的 PowerShell 会话

问题描述

我正在尝试通过 PowerShell 连接到 Microsoft Exchange,但我不断收到“拒绝访问”错误。 我正在使用具有营业执照的全局管理员进行连接,所以这应该不是问题。

我运行的命令:

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

错误信息:

New-PSSession : [outlook.office365.com] Connecting to Remote Server
outlook.office365.com Failed with the following error message : Access
denied. For more information,see the about_Remote_Troubleshooting
Help topic. At line:1 char:12 $Session = New-PSSession
-ConfigurationName Microsoft.Exchange -Conne ...
+ CategoryInfo: OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession],PSRemotingTransportException FullyQualifiedErrorId :
AccessDenied,PSSessionopenFailed

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)