Question

I'm new to Sharepoint... and I'm trying to deploy a simple web part.

When I do deploy it and place it on a page, I get an error with a correlation id.

Now, I'm trying to get details about the error, and using Powershell I type...

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

But it's giving me an error....

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

Any ideas as to what I'm doing wrong?

Was it helpful?

Solution 2

I was starting the solo powershell instead of the sharepoint one. In the task bat there is "Sharepoint 2010 Management Shell", using that worked.

OTHER TIPS

Most likely you are on an ordinary Powershell session. The Sharepoint management snap-in is not being loaded, so cmdlet is not found. Take a look at an article that describes how to load the snap-in automatically to all Powershell sessions.

The snap-in is loaded manually like so,

Add-PSSnapin "Microsoft.SharePoint.PowerShell"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top