About Help

Choose a topic from the list on the left or search for a specific topic. Choose a topic from the list or search for a specific topic.
Cmdlets  Providers  Aliases  Modules
 

about_SPWebAppBlockedFileTypes

Spwebappblockedfiletypes

SharePointDSC
 

SHORT DESCRIPTION

 

.NAME

    SPWebAppBlockedFileTypes 
 
# Description 
     
    This resource is responsible for controlling the blocked file type setting on a 
    specific web application. It has two modes of operation, the first is to use 
    the "blocked" property, where you are able to define a specific list of file 
    types that will be blocked. In this mode when it is detected that the list 
    does not match the local farm, it is set to match this list exactly. The 
    second mode is to use the "EnsureBlocked" and "EnsureAllowed" properties. 
    EnsureBlocked will check to make sure that the specified file types are on the 
    list, and if not they will be added. EnsureAllowed checks to make sure that a 
    file type is not on the list, and if it is it will be removed. Both of these 
    properties will only make changes to the file types in their list and will 
    leave the full list as it is otherwise, whereas the blocked property resets 
     
.PARAMETER Url 
    Key - string 
    The URL of the web application to set blocked file types for 
 
.PARAMETER Blocked 
    write - string 
    This is a fixed list to use for blocked file types in this web app 
 
.PARAMETER EnsureBlocked 
    write - string 
    This list of file types that will always be added to the list for this web app. Types not in this list will be left in the list 
 
.PARAMETER EnsureAllowed 
    write - string 
    This list of file types that will always be removedfrom the list for this web app. Types not in this list will be left in the list 
 
.PARAMETER InstallAccount 
    Write - string 
    POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5 
 
 

.EXAMPLE

    This example shows how to ensure that specific file types are always blocked while  
    others will always be allowed. Any file types not mentioned in this config will be 
    able to be managed manually. 
 
 
    Configuration Example  
    { 
        param( 
            [Parameter(Mandatory = $true)] 
            [PSCredential] 
            $SetupAccount 
        ) 
        Import-DscResource -ModuleName SharePointDsc 
 
        node localhost { 
            SPWebAppBlockedFileTypes PrimaryWebAppBlockedFileTypes 
            { 
                Url                    = "http://exmaple.contoso.local" 
                EnsureBlocked          = @("exe", "dll", "msi") 
                EnsureAllowed          = @("pdf", "docx", "xlsx") 
                PsDscRunAsCredential   = $SetupAccount 
            } 
        } 
    } 
 
 

.EXAMPLE

    This example shows how to ensure that the blocked file type list always 
    specifically matches this list. 
 
 
    Configuration Example  
    { 
        param( 
            [Parameter(Mandatory = $true)] 
            [PSCredential] 
            $SetupAccount 
        ) 
        Import-DscResource -ModuleName SharePointDsc 
 
        node localhost { 
            SPWebAppBlockedFileTypes PrimaryWebAppBlockedFileTypes 
            { 
                Url                    = "http://exmaple.contoso.local" 
                Blocked                = @("exe", "dll", "msi") 
                PsDscRunAsCredential   = $SetupAccount 
            } 
        } 
    }