Remove Blocked File Types on your SharePoint 2010 Web Application
There is a list of blocked file types by default in SharePoint 2010.
ade
adp
app
asa
ashx
asmx
asp
bas
bat
cdx
cer
chm
class
cmd
cnt
com
config
cpl
crt
csh
der
dll
exe
fxp
gadget
grp
hlp
hpj
hta
htr
htw
ida
idc
idq
ins
isp
its
jse
ksh
lnk
mad
maf
mag
mam
maq
mar
mas
mat
mau
mav
maw
mcf
mda
mdb
mde
mdt
mdw
mdz
msc
msh
msh1
msh1xml
msh2
msh2xml
mshxml
msi
msp
mst
ops
pcd
pif
pl
prf
prg
printer
ps1
ps1xml
ps2
ps2xml
psc1
psc2
pst
reg
rem
scf
scr
sct
shb
shs
shtm
shtml
soap
stm
svc
url
vb
vbe
vbs
ws
wsc
wsf
wsh
In Microsoft IT, we wanted to remove the blocked file types to have users have the freedom to upload the necessary files they need. Note: We also have Forefront for SharePoint running on our farms so we are less concerned for any sort of virus/malware on our machines.
Here is the script I created to remove all the Blocked File types on your farm. Let me know if you have any questions. Thanks!
###
# Name: Remove All Blocked File Extensions from a Default SharePoint Web Application
# Created By: Nate Bruneau (nathbr)
# Date: 8/5/2010
###
$env:farmurl = "https://intranet"
$webapp = Get-SPWebApplication "$env:farmurl"
$blockFileExs = $webapp.BlockedFileExtensions
$list = @()
foreach ($fileEx in $blockFileExs){
Write-Host -ForegroundColor Yellow "Removing Blocked File Extension: $fileEx"
$list += $fileEx
}
foreach ($item in $list){
$blockFileExs.Remove("$item")
}
$webapp.Update()