无法在线进行Powershell SharepPoint的导入模块 [英] Can't Import-module for Powershell SharepPoint online

查看:180
本文介绍了无法在线进行Powershell SharepPoint的导入模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



当我使用

导入模块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:

HTTPS://social.technet .microsoft.com / wiki / contents / articles / 33301.sharepoint-online-troubleshooting-import-module-could-not-load-assembly-version-issue.aspx

https://techcommunity.microsoft.com/t5/SharePoint-Developer/Error-when-using-PnP-powershell-and-CSOM/td-p / 33781

您可以在此处下载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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆