Last updated on Sep 30, 2021
Do not allow infected files to be downloaded from SharePoint Online
Office 365 helps protect your environment by detecting viruses and malware in file that users upload to SharePoint Online. Files are scanned for viruses after they are uploaded. If a file is found to be infected, a property is set so that users can’t download or sync the file.
To get started, a connection to SharePoint Online needs to be established. The SharePoint PowerShell Module can be downloaded here.
Once the PowerShell Module has been installed, run the following to connect to SharePoint Online.
1 |
Connect-SPOService -Url https://tenantdomain-admin.sharepoint.com |
Enter Global Admin username and Password
Now that a connect has been established, let’s go ahead and view the current settings for Infected Files.
1 |
Get-SPOTenant |select DisallowInfectedFileDownload |
As per the above image, you will notice that the default configuration allows for the infected file to be downloaded.
Now let go ahead and change this setting to Disallow Infected Files to be downloaded.
1 |
Set-SPOTenant -DisallowInfectedFileDownload $true |
To view the changes run:
1 |
Get-SPOTenant |select DisallowInfectedFileDownload |
Be First to Comment