无法在线进行Powershell SharepPoint的导入模块 [英] Can't Import-module for Powershell SharepPoint online
问题描述
当我使用
导入模块Microsoft.Online.SharePoint.PowerShell
when I use
Import-Module Microsoft.Online.SharePoint.PowerShell
它说
PS C:\ Windows \ system32> Import-Module Microsoft.Online.SharePoint.PowerShell
Import-Module:无法从程序集'Microsoft.SharePoint.Client,Version = 16.0.0.0加载'Microsoft.SharePoint.Administration.DesignPackageType'类型, Culture = neutral,
$
PublicKeyToken = 71e9bce111e9429c'。
在行:1 char:1
+ Import-Module Microsoft.Online.SharePoint。 PowerShell
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~
+ CategoryInfo:NotSpecified :( :) [Import-Module],TypeLoadException
+ FullyQualifiedErrorId:System.TypeLoadException, Microsoft.PowerShell.Commands.ImportModuleCommand
PS C:\Windows\system32> Import-Module Microsoft.Online.SharePoint.PowerShell
Import-Module : Could not load type 'Microsoft.SharePoint.Administration.DesignPackageType' from assembly 'Microsoft.SharePoint.Client, Version=16.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c'.
At line:1 char:1
+ Import-Module Microsoft.Online.SharePoint.PowerShell
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Import-Module], TypeLoadException
+ FullyQualifiedErrorId : System.TypeLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand
我安装了这个二进制模块:
I have this binary module installed:
目录:C:\Program Files \ WindowsPowerShell \Modules
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType版本名称导出命令
------ ---- ------- ---- ----------------
$
Binary 16.0.86 ... Microsoft.Online。 SharePoint.Powe ...
二进制16.0.80 ......微软。 Online.SharePoint.Powe ...
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Binary 16.0.86... Microsoft.Online.SharePoint.Powe...
Binary 16.0.80... Microsoft.Online.SharePoint.Powe...
任何线索?
推荐答案
Andrew_Bond,
Hi, Andrew_Bond,
根据错误消息,问题可能是由DLL文件版本不匹配引起的。 SharePoint Online Management shell正在尝试使用旧的.DLL文件。
According to the error message, the issue may be caused by the mismatch of DLL file Version. The SharePoint Online Management shell is trying to use an old .DLL file.
您可以尝试重新安装最新版本的SharePoint Online管理外壳程序,并确保没有其他适用于SharePoint Online的SDK。
You can try to re-install the SharePoint Online management shell of latest version and make sure you don’t have other SDKs for SharePoint Online.
以下是一些讨论类似症状的线索以及您可以参考的解决方案:
Here are some threads talking about similar symptoms along with solutions you can refer to:
您可以在此处下载SharePoint Online管理外壳:
You can download the SharePoint Online management shell here:
< a href ="https://apac01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.microsoft.com%2Fen-sg%2Fdownload%2Fdetails.aspx%3Fid%3D35588&data=02%7C01 %7CV-jexu%40microsoft.com%7C390800f9e299435c6f4108d6a07c85e8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636872854014277786&SDATA = LWsYBevIa5sz4su1AU90hCojVxJybVVJyOt1MqUZ2Fg%3D&保留= 0\" > https://www.microsoft.com/en-sg/download/details.aspx?id=35588
我期待听到您的更新。
I look forward to hear your update.
最好的问候
Jerry Xu
这篇关于无法在线进行Powershell SharepPoint的导入模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!