使用Windows PowerShell从远程PC运行Powershell命令 [英] Running Powershell command from remote PC using windows powershell

查看:623
本文介绍了使用Windows PowerShell从远程PC运行Powershell命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试按照本教程将本地SharePoint迁移到在线. https://blogs.technet.microsoft.com/nishants/2015/07/18/using-windows-powershell-cmdlets-for-sharepoint-online-o365spo-migration/

我获得了访问权限,并能够使用New-PSSession -ComputerNameComputerName NameoftheComputer连接到服务器

但是当我运行export-spweb命令时,它出现以下错误

无法将export-spweb识别为cmdlet的名称.

服务器位于不同的位置,但是我的PC在同一域中.我的PC中没有安装共享点,因此Add-PSSnapin Microsoft.Sharepoint.Powershell也不起作用.

I am trying to follow this tutorial to migrate SharePoint on premises to online. https://blogs.technet.microsoft.com/nishants/2015/07/18/using-windows-powershell-cmdlets-for-sharepoint-online-o365spo-migration/

I was provided with the access and was able to connect to the server with New-PSSession -ComputerName NameoftheComputer

But when i run the export-spweb command it gives me below error

export-spweb is not recognized as the name of a cmdlet.

The server is located on a different location but my PC is in the same domain. I do not have sharepoint installed in my PC hence Add-PSSnapin Microsoft.Sharepoint.Powershell is not working either.

我已经尝试按照链接中的建议进行操作,并且能够在服务器和客户端上都运行所有命令,但是仍然收到如下所述的错误https://blogs.technet.microsoft.com/anneste/2014/09/17/如何为非管理员启用远程Powershell for Sharepoint-2013/

I have tried as suggested in the link and was able to run all the commands both on the server and the client side but still it got the error as mentioned below https://blogs.technet.microsoft.com/anneste/2014/09/17/how-to-enable-remote-powershell-for-sharepoint-2013-for-non-administrators/

我已经尝试过命令Add-PSSnapin Microsoft.Sharepoint.Powershell

但会引发以下错误此计算机上未安装add-pssnapin microsoft.sharepoint.powershell"

I have tried the command Add-PSSnapin Microsoft.Sharepoint.Powershell

but it throws the below error "add-pssnapin microsoft.sharepoint.powershell is not installed on this computer"


推荐答案

通常,您可以通过使用RDP访问SharePoint服务器,然后在RDP会话中从SharePoint服务器运行PowerShell命令来做到这一点.除了从您自己的工作站远程运行命令外,我不知道有任何其他方法 RDP.
Normally you would do this by accessing the SharePoint server using RDP and then run the PowerShell commands from the SharePoint server in the RDP session.  I don't know of any way to run the commands remotely from your own workstation other than RDP.


这篇关于使用Windows PowerShell从远程PC运行Powershell命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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