Thursday, January 22, 2015

Powershell Commands



New ULS Logs file
Use the below command when ever you want to create a new new Log file.
This is very helpful while investigating an issue. To get ULS logs for 30 seconds, execute the below command twice at starting and end of 30th second, so you will have a separate log file for the time period.
New-SPLogFile


Merge URLs Logs:
Combines trace log entries from all farm computers into a single log file on the local computer.

Merge-SPLogFile -Path <String> [-Area <String[]>] [-AssignmentCollection <SPAssignmentCollection>] [-Category <String[]>] [-ContextFilter <String[]>] [-Correlation <Guid[]>] [-EndTime <DateTime>] [-EventID <String[]>] [-ExcludeNestedCorrelation <SwitchParameter>] [-Level <String>] [-Message <String[]>] [-Overwrite <SwitchParameter>] [-Process <String[]>] [-StartTime <DateTime>] [-ThreadID <UInt32[]>]