SharePoint 2016, Sharepoint 2013, Sharepoint 2010, Windows Server 2012, Sql Server 2012,2014,IIS, Active Directory,User Profile Service, Managed MetaData Service, Search Service, Topology, Web Application, IIS, Site collection, List, Library, PowerShell, office web app, Windows Authentication, NTLM, Kerberos, Saml, ADFS, Active Directory Import, MIM, SharePoint 2016 Manage Block File Types(PowerShell, Central Admin) – SharePoint

SharePoint 2016 Manage Block File Types(PowerShell, Central Admin)

You can restrict file types from being uploaded or downloaded in SharePoint 2013. Each web application maintains a list of blocked file types that is based on file name extensions.Today, I will walkthrough the process / steps to manage the Block File types in SharePoint 2016. We can manage them via Central Admin or PowerShell.

Scenario:

In our company, there is requirement to block the ‘exe’  file extensions from being upload to SharePoint.

Manage the File Types Using Central Administration.

here are the steps:

  1. Logon on Central Admin web site using the Farm Administrator account.
  2. In Central Administration, click Security.
  3. On the Security page, in the General Security section, click Define blocked file types.
    bft2
  4. On the Blocked File Types page, if you want to change the selected web application(1), on the Web Application menu, click Change Web Application. Use the Select Web Application page to select a web application.
  5. Do one of the following:
    1. To Block

      1. To block an additional file type, scroll to the bottom of the Type each file name extension on a separate line text box, type the file name extension (2) that you want to block, and then click OK(3).btf2
    2. To Remove

      1. To stop blocking a file type, select a file type from the list, press the Delete key, and then click OK.

NoteNote:You do not have to type a file name extension in the list in alphabetical order. The next time that you open the list, the file name extension you added will be correctly sorted in alphabetical order.

Manage the File Types Using PowerShell

Please follow the Bleow Steps:

  • Launch the SharePoint PowerShell Windows as “Run as Administrator”.

To View Existing Block File Extension

  • In PowerShell windows Please run the following command.
  • $webapp  = Get-SPWebApplication “Url of the Web Application”
  • $ext = $webapp.BlockedFileExtensions
  • Write-Host “List of Block File extensions are” $ext  -ForegroundColor “Blue”

To Add Existing Block File ExtensionIn PowerShell windows Please run the following command.

    • In PowerShell windows Please run the following command.
    • $webapp  = Get-SPWebApplication “Url of the Web Application”
    • $ext = $webapp.BlockedFileExtensions
    • $ext.Add(“exe”)
    • $webapp.update()

To Remove Existing Block File Extension

  • In PowerShell windows Please run the following command.
  • $webapp  = Get-SPWebApplication “Url of the Web Application”
  • $ext = $webapp.BlockedFileExtensions
  • $ext.Remove(“exe”)
  • $webapp.Update()

For Complete Code please visit the Technet Gallery here: SharePoint 2016 Block File Type Operations PowerShell

 

You may also like...

Leave a Reply

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