简体   繁体   English

为Microsoft SharePoint添加PowerShell管理单元时出错

[英]Error when adding powerShell snapins for Microsoft SharePoint

I have SharePoint PowerShell scripts that I need to run locally on PowerShell v5.0 我拥有在PowerShell v5.0上本地运行的SharePoint PowerShell脚本

I've tried to execute Add-PSSnapin "Microsoft.SharePoint.PowerShell" but it throws error: 我试图执行Add-PSSnapin "Microsoft.SharePoint.PowerShell"但会引发错误:

The Windows PowerShell snap-in 'Microsoft.SharePoint.PowerShell' is not installed on this computer. Windows PowerShell管理单元“ Microsoft.SharePoint.PowerShell”未安装在此计算机上。

How do I download those dlls and install the snap-in? 如何下载这些dll并安装管理单元?

You have to either RDP onto the SharePoint Server itself, or use a PSSession to connect to the Server via PowerShell like this: 您必须要么RDP到SharePoint Server本身,要么使用PSSession通过PowerShell通过以下方式连接到Server:

New-PSSession -ComputerName SP2013Server
Add-PSSnapin Microsoft.SharePoint.Powershell

To do this PSRemoting will need to be enabled on the Server 为此,需要在服务器上启用PSRemoting

我不知道是不是这种情况,但是当我错误地在Powershell ISE(x86)而不是64位版本上运行脚本时,却收到了此错误消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM