ADManager Plus中的Office 365设置(手动安装MSOnline PowerShell模块)

ADManager Plus中的Office 365设置(手动安装MSOnline PowerShell模块)

 通过ADManager Plus管理Office 365上的账户,需要在管理页面配置Office 365设置,如果提示如下信息,说明需要在ADManager Plus服务器上安装MSOnline PowerShell模块


















请在ADManager Plus服务器上按照如下步骤进行安装











注意:如果在执行上述命令中的最后一个命令install-packageprovider -Name NuGet  -MinimumVersion 2.8.5.201 -Force -Scope CurrentUser,返回如下的报错



主要是由于TLS引起的,需要先执行如下命令:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
再重新执行install-packageprovider -Name NuGet  -MinimumVersion 2.8.5.201 -Force -Scope CurrentUser,便可以执行成功
下载MSOnline离线包到ADManager Plus服务器
https://www.powershellgallery.com/packages/MSOnline/1.1.183.57


以管理员身份运行PowerShell,然后执行Unblock-File -Path C:\Downloads\msonline.1.1.183.57.nupkg (-Path为离线包存储路径)
用解压软件将msonline.1.1.183.57.nupkg文件解压,文件夹名称修改为msonline.storage
msonline.storage文件夹复制到C:\Windows\System32\WindowsPowerShell\v1.0\Modules
以上操作步骤来自微软技术文档
https://docs.microsoft.com/en-us/powershell/scripting/gallery/how-to/working-with-packages/manual-download?view=powershell-7
在PowerShell中执行Install-Module MSOnline -Force -Scope CurrentUser,该命令执行可能需要5-10分钟,请耐心等待。

安装好之后,便可以在管理页面配置Office 365