我正在尝试通过 powershell 连接到 Exchangeonline,但出现以下错误:
Unable to find type [Microsoft.Exchange.Management.RestApiClient.ExchangeEnvironment].
At C:\ProgramFiles\WindowsPowerShell\Modules\exchangeonlinemanagement\netFramework\ExchangeOnlineManagement.psm1:274 char:9
+ [Microsoft.Exchange.Management.RestApiClient.ExchangeEnvironm ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Microsoft.Excha...angeEnvironment:TypeName) [], RuntimeException
+ FullyQualifiedErrorId : TypeNotFound
我刚刚执行了以下命令来安装模块:
Install-Module -Name ExchangeOnlineManagement
Import-Module -Name ExchangeOnlineManagement
另外,我打开了ps1。并尝试运行 ExchangeOnlineManagement.psm1 并出现错误。
Import-Module : The specified module 'Microsoft.Exchange.Management.RestApiClient.dll' was not loaded because no valid module file was found in any module directory.
对故障排除有何建议?