我是Sharepoint的新手...,我正在尝试部署一个简单的Web部件。

当我部署它并将其放置在页面上时,出现带有关联ID的错误。

现在,我试图获取有关该错误的详细信息,并使用Powershell输入...

 get-splogevent | ?{$_Correlation -eq "bcce1b39-f277-4b2b-b8f8-4c113a30f193" }

但这给了我一个错误....
The term 'get-splogevent' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:15
+ get-splogevent <<<<  | ?{$_Correlation -eq "bcce1b39-f277-4b2b-b8f8-4c113a30f193" }
    + CategoryInfo          : ObjectNotFound: (get-splogevent:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

关于我在做什么错的任何想法吗?

最佳答案

您很可能在普通的Powershell session 中。未加载Sharepoint管理管理单元,因此找不到cmdlet。看一看an article,它描述了如何将管理单元自动加载到所有Powershell session 。

像这样手动加载管理单元,

Add-PSSnapin "Microsoft.SharePoint.PowerShell"

关于powershell - 术语 'get-splogevent'无法识别为cmdlet的名称,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/22978437/

10-17 00:55