默认情况下在powershell ISE 中使用sharepoint 命令会提示错误,例如执行get-spsite:
无法将“get-spsite”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后重试。
所在位置 行:1 字符: 11
+ get-spsite <<<<
+ CategoryInfo : ObjectNotFound: (get-spsite:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
解决办法:在powershell ISE 中先执行:add-pssnapin "microsoft.sharepoint.powershell"
在powershell 中使用 get-command -pssnapin "microsoft.sharepoint.powershell" 可以查看所有相关sharepoint的命令。
本文介绍了解决PowerShell ISE中使用SharePoint命令出现错误的方法。通过加载Snap-in来启用SharePoint相关命令,并展示了如何查看所有可用的SharePoint命令。
78

被折叠的 条评论
为什么被折叠?



