Long live the best SharePoint ULS Viewer

Update (15th June 2014): We may see a return of the SharePoint ULS Viewer very soon. Jeremy Thake and Office Dev indicated it is coming back to life very soon.

 

 

Community Discussion (9th June 2014): SharePoint Consultant and MVP Vlad Catrinescu has started a discussion about possible replacements for the ULS Viewer on the SharePoint Community site (http://sharepoint-community.net/forum/topics/what-is-the-best-replacement-for-ulsviewer).

After noticing a tweet from Brian Lalancette ‏(@brianlala, you might also know him through his AutoSPInstaller project), I gasped at the thought that the best ULS Viewer for SharePoint is no longer going to be available.

Along with many others in the SharePoint community, I was quite surprised by this news and started to consider what alternative was available. I’ve used the ULS Viewer from MSDN so many times I have lost count and don’t know where I would be without it.

The best ULS Viewer
The best ULS Viewer

For those who’ve found this post and just want to download a copy of the ULS Viewer tool, you’re in luck. I have preserved a copy of ULS Viewer as a .exe and a .zip archive – these are available here http://bit.ly/UlsViewer and http://bit.ly/UlsViewerzip.
You might receive a warning from the URL shortening service when using the .exe link warning against directly downloading an exe – this is why I have also provided a ZIP version.

Other SharePoint ULS Viewer tools…

As the ULS Viewer is no longer available I thought I shared some alternative tools or techniques to get access to the SharePoint ULS logs.

ULS Studio

A Codeplex project that I’ve used on several occasions and does somewhat come close to the features that the ULS Viewer tool had – ULS Studio (https://uls.codeplex.com).

ULS Studio
ULS Studio

CSOM for SharePoint Online

If you’re using SharePoint Online you could follow Vardhaman Deshpande’s blog post (http://www.vrdmn.com/2014/03/view-tenant-uls-logs-in-sharepoint.html) and access the ULS logs using the Client-Side Object Model (CSOM).

SPO ULS with CSOM - Vardhaman Deshpande
SPO ULS with CSOM – Vardhaman Deshpande

Developer Dashboard

There’s also the ULS tab within the Developer Dashboard, although this is limited to reviewing errors related to those requests where the Developer Dashboard is displayed or used.

The Developer Dashboard can be activated using PowerShell – SharePoint Developer Devendra Velegandla shares the PowerShell and reviews the Developer dashboard on his blog (http://www.sharepoint-journey.com/developer-dashboard-in-sharepoint-2013.html).

$svc = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$dds = $svc.DeveloperDashboardSettings
$dds.DisplayLevel = "On"
$dds.Update()
ULS errors displayed in the Developer Dashboard
ULS errors displayed in the Developer Dashboard

PowerShell

Use can even use PowerShell to get details about a correlation error. Wictor Wilén shares details about this method in an article on his blog (http://www.wictorwilen.se/Post/Working-with-SharePoint-2010-Correlation-ID-in-PowerShell-and-code.aspx).

Get-SPLogEvent | out-gridview
Get-SPLogEvent | Out-GridView
Get-SPLogEvent | Out-GridView

Summary

While I’m not going to stop using the ULS Viewer – I can only recommend you use something to help you view the SharePoint ULS logs. Troubleshooting SharePoint is not easy but you can help yourself, firstly by always checking the event log and secondly being comfortable with your method of doing.

Long live the best ULS Viewer.

The Deployment Guide of all SharePoint 2013 Deployment Guides

Let me introduce you to the Deployment guide for Microsoft SharePoint 2013. Anyone deploying, installing or configuring SharePoint 2013 absolutely must read this!

This particular Deployment Guide is 674 pages long and like no other. It was published by the Microsoft Office System and Servers Team at Microsoft back in October 2012.

It is such a great guide and is packed full of information. Reading through the deployment guide, I discovered some neat little tricks and refreshed myself on some pretty important best practices which are always a good exercise.

Download it now, get reading and share it!

Working with SharePoint’s Second Stage Recycle Bin in PowerShell

I thought I’d share a PowerShell script that I’ve created to perform a few tasks against a Site Collection Second Stage Recycle Bin (SSRB) in SharePoint.

Remove-SecondStageRecycleBinItems.ps1
Remove-SecondStageRecycleBinItems.ps1

The requirement was to delete items that were older than a set number of days from the Second Stage Recycle Bin (SSRB). A record of each item deleted also needed to be added to a report.  But SharePoint can do this already I hear you say…well yes if a Site Collection quotas and the auditing features are used. In this scenario neither could be.

To display items in the Second State Recycle Bin in a table I used this command.

$site.Recyclebin | where { $_.ItemState -eq "SecondStageRecycleBin" -and $_.deleteddate -le $dateDiff} | Format-Table -Property Title, Web, DeletedBy, DeletedDate -Autosize -Wrap

Then to remove each item from the Recycle Bin I used the delete command.

$site.Recyclebin.Delete($_.ID)

The full script is shared below. Remember to review, rename and test this script before using it in a production environment.

One quirk I found while creating the script was that through the web browser, SharePoint reported the time each file was deleted correctly whereas, in PowerShell, the time was not honouring GMT summer time.

British Summer Time  in SharePoint vs. PowerShell
British Summer Time in SharePoint vs. PowerShell

Enjoy and delete carefully!

Configuring a host name with a SSL Certificates in IIS 7

A customer asked me if I could help troubleshoot their SharePoint environment – they had extended a web application and configured it to use Forms Based Authentication (FBA) with SSL however they were getting errors when accessing the new site.

I started troubleshooting the configuration across all the servers in their SharePoint 2013 farm. I stepped through the configuration for the web application in Central Administration – reviewing the authentication provider settings and alternate access mappings. I then reviewed the web.config and made sure that the FBA settings were present and correct along with the IIS website bindings. This is when I noticed that there was no hostname against the https/443 binding –  the option to add one was also disabled.

IIS binding - host name disabled
IIS binding – host name disabled

After a little research, I found an article from ArmgaSys.  It turns out that my customer’s wildcard SSL certificate was issued without an * in the name, therefore, the hostname cannot be specified once the SSL certificate is selected. I followed the steps in this article from and the customer was able to access their SharePoint site without any errors this time.

IIS binding - host name editable
IIS binding – host name editable

A summary of these instructions are included below: –

  1. To resolve this and make the hostname field editable launch Microsoft Management Console (MMC) and open the Certificates snap-in.
  2. Locate the wildcard certificate, right click on it and select properties.
  3. If the Friend Name property doesn’t start with a * then add one and apply any changes you make.
  4. Now go back to IIS and select the SSL certificate in the bindings of the SharePoint website with the issue.
  5. The hostname field should now be editable where you should then enter the hostname for your SharePoint site.