我正在尝试运行SharePoint 2010命令行管理程序,但它抛出错误。
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企业版之外,我不知道是什么原因导致类型不匹配。
有人知道为什么吗?
发布于 2016-02-12 09:33:18
假设您正在讨论从普通的PowerShell命令行加载SharePoint命令行Add-PSSnapin,参数为Microsoft.SharePoint.PowerShell ...
最可能的原因是你在x86 powershell下运行的一些问题,这使得x64 .dlls不兼容。
您可以尝试检查$pshost,以查看路径是指向x86还是PowerShell的x64版本:
$pshome #如果使用x64,您将看到:
C:\Windows\System32\WindowsPowerShell\v1.0
> $pshome #if x86 host only you will see:
C:\Windows\SysWOW64\WindowsPowerShell\v1.0https://stackoverflow.com/questions/35301772
复制相似问题