The New-SPLogFile cmdlet in SharePoint 2013 creates a new ULS trace log file on execution. In other words, once you execute the New-SPLogFile command, it ends the current log file and creates a new log file. All subsequent errors will be placed in the new log file, which intern greatly helps to isolate all new errors.
It’s a good idea to start a new log file when you troubleshoot any issues in SharePoint, as identifying current issues from existing logs could be cumbersome, while existing log files can become large and difficult to scan through. Here is how you can utilize the New-SPLogFile cmdlet.
- Go to SharePoint PowerShell Management Shell
- Type: New-SPLogFile and hit enter. It doesn’t have any parameters.
- Now, your new trace log file will be created. Once the new log file is created, you can trigger the event that is causing issues.
- Get your trace log location from the diagnostic log path. Go to: Central Administration >> Monitoring >> Configure diagnostic logging >> Trace Log Path
- Go to the trace log location, sort using created date, and there you’ll find your new log file created! Open it to start your troubleshooting.
Technet reference on New-SPLogFile