When you run the script, the log level is raised to Verbose and a new SPLog file is created for this verbose log.
When you press a key, the log level is resetted to the default one, and a new SPLog file is created, so the penultimate log file is the one you need to examine.
This is the script: enjoy
$ver = $host | select version if ($ver.Version.Major -gt 1) {$host.Runspace.ThreadOptions = "ReuseThread"} if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) { Add-PSSnapin "Microsoft.SharePoint.PowerShell" } Write-Host "Setting TraceSeverity and EventSeverity to Verbose" Set-SPLogLevel -TraceSeverity Verbose -EventSeverity Verbose Write-Host "Creating a new Log file" New-SPLogFile Read-Host "Press ENTER key to reset default log level" Write-Host "Resetting TraceSeverity and EventSeverity" clear-sploglevel Write-Host "Creating a new Log file for resetted log" new-splogfile Read-Host "Press any key to exit ..."Or maybe download it from here.
It's difficult to find knowledgeable people for this subject, however, you seem like you
ReplyDeleteknow what you're talking about! Thanks
I think the admin of this web site is really working hard in support
ReplyDeleteof his website, since here every information is quality based material.
I blog quite often and I genuinely thank you for your content.
ReplyDeleteThis article has really peaked my interest. I'm going to bookmark
your site and keep checking for new details about once a week.
I opted in for your Feed too.