Maximum File Size Per Extension in SharePoint 2013

In SharePoint 2013, the Maximum file upload size is increased to 250 MB – which means users can upload any single file up to 250 MB in size. If users try to upload a larger file than the configured web application limit, they receive an error message saying it exceeded the maximum length allowed!
MaximumFileSizePerExtension in SharePoint
SharePoint 2013 introduced a new feature called “MaximumFileSizePerExtension” to set maximum upload size exclusively for certain file types. E.g., Your web application’s default Maximum size for uploading files would be 250 MB, But you can add an exception for “WMV” files up to 2 GB!

By default, Microsoft One Note files (.ONE) are configured with a 1 GB size limit. Here are the PowerShell cmdlets to manage this configuration. To view file types set in MaximumFileSizePerExtension property:

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

$WebApp = Get-SPWebApplication "https://your-sharepoint-web-app-url"

$WebApp.MaximumFileSizePerExtension

This gives currently configured file extensions for maximum file size exclusions. To add file type extensions, such as WMV, use the following PowerShell cmdlet:

$WebApp = Get-SPWebApplication "https://your-sharepoint-web-app-url"

$WebApp.MaximumFileSizePerExtension.Add("wmv",1024)

$WebApp.Update()

To remove the file extension from Maximum file size:

$WebApp = Get-SPWebApplication "https://your-sharepoint-web-app-url"

$WebApp.MaximumFileSizePerExtension.remove("wmv")

$WebApp.Update()

Salaudeen Rajack

Salaudeen Rajack is a SharePoint Architect with Two decades of SharePoint Experience. He loves sharing his knowledge and experiences with the SharePoint community, through his real-world articles!

Leave a Reply