首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >此计算机上未安装PSSnapin Microsoft.Sharepoint.Powershell

此计算机上未安装PSSnapin Microsoft.Sharepoint.Powershell
EN

Stack Overflow用户
提问于 2019-05-15 02:48:55
回答 1查看 4.9K关注 0票数 0

尝试在SharePoint Online命令行管理程序中运行命令Add-PSSnapin Microsoft.SharePoint.Powershell

我得到以下错误:

代码语言:javascript
复制
Add-PSSnapin : The Windows PowerShell snap-in 'Microsoft.SharePoint.Powershell` is not installed on this computer

+ CategoryInfo: InvalidArgument: (Microsoft.SharePoint.Powershell:string) [Add-PSSnapin], PSArgumentException

据我所知,这应该与SharePoint Online命令行管理程序一起安装(这是新下载的),那么为什么不让我安装它

我可以使用$AdminURL,$AdminName和$Password登录到Sharepoint,所以这不是世界末日(并证明这应该是可行的),但显然使脚本不太容易跨网站运行,因为它必须每次修改以更改url和管理员名称

编辑:我在另一篇文章中读到,添加这个模块(而不是管理单元)可以解决我的错误Get-SPSite is not recognized as the name of a cmdlet, function, script file, or operable programGet-SPWebApplication is not recognized as the name of a cmdlet, function, script file, or operable program的问题,然而,这并没有解决我的问题……

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-05-15 03:20:47

正如user @kuzimoto提到的,我使用的命令与SharePoint Online不兼容,并且被设计为与SharePoint服务器结合使用。

正确的连接方式是使用命令Connect-SPOService并通过该命令传递凭据,或者将凭据硬编码到脚本中。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56136741

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档