For viewing in command promt
get-splogevent | ?{$_.Correlation -eq "<GUID>"} | select Area, Category, Level, EventID, Message |
Format-List
For viewing as log file as text file
get-splogevent | ?{$_.Correlation -eq "<GUID>"} | select Area, Category, Level, EventID, Message |
Format-List > C:\SPError.log
You can get faster results when I limit the time span .
Get-SPLogEvent -StartTime YYYY-MM-DDTHH:mm:ss | ?{$_.Correlation -eq "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"} | select Area, Category, Level, EventID, Message |
Format-List
Get-SPLogEvent -StartTime YYYY-MM-DDTHH:mm:ss | ?{$_.Correlation -eq "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"} | select Area, Category, Level, EventID, Message |
Format-List
post examples.......
ReplyDeleteneed example!!!
ReplyDeleteget-splogevent : The term 'get-splogevent' is not recognized as the name of a cmdlet, function, script file, or operabl
ReplyDeletee 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:1
+ get-splogevent | ?{$_Correlation -eq "31e4719c-2f4e-f039-1cde-e675775e9aca" }
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (get-splogevent:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Mathewsun, you skipped dot between "$_" and "Correlation"
ReplyDeleterun as admin an add the ps snappin
ReplyDelete