Friday, 9 December 2016

PowerShell to Change the Retention period of Usage Health and Data.

Powershell is a PowerFull tool and it always come to save us all with any requirements we have.

This post on how to change the retention period of Usage Health and Data.

Lets get started :)

This applies to SharePoint 2013 and 2016

First we check the Usage details using below Powershell Cmd.


Now we change the retention period from 7 to 8 using below Powershell cmd

Get-SPUsageDefinition | ForEach-Object {Set-SPUsageDefinition -Identity $ -DaysRetained 8}

To confirm the change we will run Get-SPUsageDefinition cmd again.


Happy SharePointing :)

No comments:

Post a Comment