SharePoint 2013: How to verify ULS log and Usage log file access

Title

How to verify ULS log and Usage log file access in SharePoint 2013 via PowerShell

Business Goal

Recently I had an incident involving Usage reports that weren’t working properly in a SharePoint 2013 farm. I found a nice troubleshooting article which really helped: Snowburnt…IT happens – How to troubleshoot SharePoint Usage Reports Usage Reports.

One of the checks was what the group permissions of the WSS_WPG and WSS_ADMIN_WPG were on the ULS and Usage log file directory on the different servers in the SharePoint 2013 farm. Since I didn’t wanted to uses explorer I decided to create a script to analyse this.

Technical Overview

The solution is a PowerShell script that uses some different cmdlets (Get-SPServer & Get-SPUsageService) from the SharePoint module and the Get-Acl cmdlet. From the Usage Service you can easily get the usage and log file directory path. Via an UNC path you can check the group permissions via the Get-Acl cmdlet. I use the Get-SPServer to determine on which servers to check these permissions.

Prerequisites

To complete this how-to, you must have the following prerequisites must be met:
– A domain account that can log on to one of the SharePoint 2013 servers
– A domain account that has privileges to manage SharePoint 2013 via PowerShell (SPShellAdmin role)

Steps

1. Run the Powershell script .\verify_logfileaccess.ps1

Additional resources

Gallery Technet – Verify ULS and Log file access
Snowburnt…IT happens – How to troubleshoot SharePoint Usage Reports Usage Reports
Technet Library – Account permissions and security settings in SharePoint 2013
Technet Library – Get-Acl
Technet Library – Get-SPServer
Technet Library – Get-SPUsageService

Applies to

SharePoint 2013

Change History

22-09-2016 – 1.0

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *