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 - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

Leave a Reply

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