Powershell 错误“术语 'Get-SPWeb' 未被识别为 cmdlet、函数的名称..." [英] Powershell Error "The term 'Get-SPWeb' is not recognized as the name of a cmdlet, function..."

查看:72
本文介绍了Powershell 错误“术语 'Get-SPWeb' 未被识别为 cmdlet、函数的名称..."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是输入以下内容来尝试获取我的 SharePoint 网站:

I just typed the follow to try and get my SharePoint site:

$spWeb = Get-SPWeb -Identity "http://nycs00058260/sites/usitp"

它给了我以下错误

术语Get-SPWeb"未被识别为 cmdlet 的名称,函数、脚本...

The term 'Get-SPWeb' is not recognized as the name of a cmdlet, function, script...

网址是正确的,为什么我会收到这个错误?

The url is correct so why am I getting this error?

推荐答案

我认为这需要从 Management Shell 而不是控制台运行,听起来模块没有被导入 Powershell 控制台.您可以通过运行添加模块:

I think this need to be run from the Management Shell rather than the console, it sounds like the module isn't being imported into the Powershell console. You can add the module by running:

Add-PSSnapin Microsoft.Sharepoint.Powershell

在 Powershell 控制台中.

in the Powershell console.

这篇关于Powershell 错误“术语 'Get-SPWeb' 未被识别为 cmdlet、函数的名称..."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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