Antivirus settings in sharepoint environment can be enabled in Central Administration as well as through Powershell. In this blog, I will provide the powershell commands to enable the antivirus settings.
# Get a reference to the Administration
$adminService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
# Set antivirus settings
$adminService.AntivirusSettings.AllowDownload = $false
# Enable Download Scan
$adminService.AntivirusSettings.DownloadScanEnabled = $true
# Enable upload scan
$adminService.AntivirusSettings.UploadScanEnabled = $true
# Enable Cleaning
$adminService.AntivirusSettings.CleaningEnabled = $true
Happy SharePointing :-)

Chirag ShuklaPosted Nov 25, 2015, 11:47 AM
what are the impacts (Pros/Cons) of turning antivirus on from Central Admin or what to do settings before turning it on? What if external clients upload their document to SharePoint and if they do not have antivirus installed on their machine? How SharePoint would know whether doc is infected or not? Is there any performance issue if we turn on AV from Central Admin or what to take care before turning it on from SharePoint?
sandeep soniPosted May 15, 2014, 2:08 AM
Thank you for the useful information it's very helpful.