1
我只是試圖運行SharePoint 2010 Management Shell,但會引發錯誤。無法加載Add-PSSnapin。發生類型不匹配
Add-PSSnapin : Could not load type 'Microsoft.SharePoint.Administration.SPActionLinkType'
from assembly 'Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c' due to value type mismatch.At
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\SharePoint.ps1:3
char:13+ Add-PsSnapin <<<< Microsoft.SharePoint.PowerShell + CategoryInfo
: NotSpecified: (:) [Add-PSSnapin], TypeLoadExcept ion
+ FullyQualifiedErrorId : System.TypeLoadException,Microsoft.PowerShell.Co mmands.AddPSSnapinCommand
我不知道可能會導致類型不匹配,除了在機器中有Visual Studio 2015企業。
任何人都知道爲什麼?
我認爲如果您從默認的SharePoint命令行快捷方式 –
中直接得到這個結果,就可以通過更改快捷方式來嘗試進行修復。它在x64中運行。 :) –
$ psversiontable會告訴你什麼版本的PowerShell正在運行....我不確定SharePoint 2010管理單元是否與2.0+版本兼容(認爲它只是2.0)...所以...可能會其他的測試方法,從2.0開始,你有一個更新的版本安裝。否則,我很難過,也許psconfig會有所幫助。 –