SharePoint Tidbit - MaxTotalSizeInBytes and SharePoint 2016

Hello All,

Recently while helping a customer with a SharePoint 2016 install I discovered a change that was made and I didn't realize in previous versions of SharePoint the Usage data would start to have problems some of it missing due to the issue described here and here.

In SharePoint 2016 they have increased the value of MaxTotalSizeInBytes from approx. 444858368 to approx. 10000000000000

If you want you could run the following PowerShell

  • This command lists out current values for each Definition property (Note: MaxTotalSizeInBytes is already 10000000000000)
 Get-SPUsageDefinition | ForEach-Object {
     $_ | fl
}
  • This command will change the value to what you want (I have it being changed to 20000000000000)
 Get-SPUsageDefinition | ForEach-Object {
    $_.MaxTotalSizeInBytes = 20000000000000
}
  • Last if you did change the value you would need to unprovision then provision to make the change stick (This will cause data lose in Usage Database as it deletes everything)

$a = Get-spusageapplication
$a.Unprovision()
$a.Provision()

Pax