Month: August 2013

Removing File Types from Blocked File Types in SharePoint using PowerShell

Removing File Types from Blocked File Types in SharePoint using PowerShell

Here is a quick script for removing blocked file types.

$wa= Get-SPWebApplication -identity "http://webapplication"
$blockedFiles = $wa.BlockedFileExtensions
#list all the file types that you want to remove separating with comma as shown below:
$filesToRemove=("asc", "ascx", "asp", "aspx")
foreach($file in $filesToRemove)
{
	$blockedFiles.Remove("$file")
}
$wa.Update()
write-host "File Types are removed from Blocked File Types"