如何解决在 Centos7 上连接到 Exchange Online PowerShell V2 的问题
我正尝试在 Centos7 机器上使用 Powershell 脚本通过 ExchangeOnlineManagement
模块连接到 Exchange Online。安装 ExchangeOnlineManagement
模块没有问题,但是,当我尝试连接时它通常会挂起并仅显示 Creating implicit remoting module…
。我终于得到了下面显示的异常,它阐明了这种情况:
PS /home/user> Connect-ExchangeOnline -AppId <app_id> -CertificateFilePath /home/user/powershell.pfx -Organization <org>.onmicrosoft.com
----------------------------------------------------------------------------
The module allows access to all existing remote PowerShell (V1) cmdlets in addition to the 9 new,faster,and more reliable cmdlets.
|--------------------------------------------------------------------------|
| Old Cmdlets | New/Reliable/Faster Cmdlets |
|--------------------------------------------------------------------------|
| Get-CASMailBox | Get-EXOCASMailBox |
| Get-MailBox | Get-EXOMailBox |
| Get-MailBoxFolderPermission | Get-EXOMailBoxFolderPermission |
| Get-MailBoxFolderStatistics | Get-EXOMailBoxFolderStatistics |
| Get-MailBoxPermission | Get-EXOMailBoxPermission |
| Get-MailBoxStatistics | Get-EXOMailBoxStatistics |
| Get-MobileDeviceStatistics | Get-EXOMobileDeviceStatistics |
| Get-Recipient | Get-EXORecipient |
| Get-RecipientPermission | Get-EXORecipientPermission |
|--------------------------------------------------------------------------|
To get additional information,run: Get-Help Connect-ExchangeOnline or check https://aka.ms/exops-docs
Send your product improvement suggestions and Feedback to exocmdletpreview@service.microsoft.com. For issues related to the module,contact Microsoft support. Don't use the Feedback alias for problems or support issues.
----------------------------------------------------------------------------
Exception: /home/user/.local/share/powershell/Modules/ExchangeOnlineManagement/2.0.4/netCore/ExchangeOnlineManagementBeta.psm1:463:44
Line |
463 | … oduleInfo = Import-PSSession $PSSession -AllowClobber -disableNameChe …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Running the Get-Command command in a remote session reported the following error: Processing data for a remote command Failed with the following error message:
| MI_RESULT_Failed For more information,see the about_Remote_Troubleshooting Help topic..
所以 MI_RESULT_Failed
带我到了 this article,我基本上读到它是因为 Linux 上的 WSMan 有很多问题。我还没有尝试过他的任何建议(还),因为我想知道是否还有其他人遇到过这个问题并有解决方案。我正在使用以下版本的 Powershell 和 CentOS Linux 7.9.2009。
PS /home/user> $PsversionTable
Name Value
---- -----
Psversion 7.1.2
PSEdition Core
GitCommitId 7.1.2
OS Linux 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017
Platform Unix
PSCompatibLeversions {1.0,2.0,3.0,4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。