SPLogEvent in Sharepoint

To get the SharePoint server log from the ULS using the power shell command provided if you have a co-relation ID then
 
get-splogevent -starttime (get-date).addminutes(|-no of minutes) | where-object { $_.correlation -eq "co-relation id" } | fl message > c:\errors_just_now.txt
 *  co-relation id  is the id which you see in the Error Message
 *  no -of minutes is the approximate time you faced the issue