Skip to content

SPAntivirusSettings

dscbot edited this page Mar 17, 2023 · 18 revisions

SPAntivirusSettings

Parameters

Parameter Attribute DataType Description Allowed Values
IsSingleInstance Key String Specifies the resource is a single instance, the value must be 'Yes' Yes
ScanOnDownload Write Boolean Should documents be scanned before being downloaded
ScanOnUpload Write Boolean Should documents be scanned on upload
AllowDownloadInfected Write Boolean Should documents that are infected be allowed to be downloaded
AttemptToClean Write Boolean Should infected documents be handed to the AV engine to attempt cleaning
TimeoutDuration Write UInt16 What is the timeout for an AV scan in seconds
NumberOfThreads Write UInt16 How many concurrent threads should the AV engine be able to run on a server

Description

Type: Distributed Requires CredSSP: No

This resource is used to set the global antivirus settings for the local farm. These settings will be used to control the behavior of an external anti-virus scanning tool that is able to integrate with SharePoint. Note that this will not scan documents for viruses on it's own, an external tool still needs to be installed on the servers that integrates with SharePoint.

Examples

Example 1

This example shows how to apply specific anti-virus configuration to the farm

Configuration Example
{
    param
    (
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount
    )

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPAntivirusSettings AVSettings
        {
            IsSingleInstance      = "Yes"
            ScanOnDownload        = $true
            ScanOnUpload          = $true
            AllowDownloadInfected = $false
            AttemptToClean        = $false
            PsDscRunAsCredential  = $SetupAccount
        }
    }
}
Clone this wiki locally