Configure scanning of network files
Configurer l’analyse des fichiers réseau
Explanation
This policy setting allows the scanning of network files using on access protection. The default is enabled. Recommended to remain enabled in most cases.
If you enable or do not configure this setting, network files will be scanned.
If you disable this setting, network files will not be scanned.
Ce paramètre de stratégie permet l’analyse des fichiers réseau à l’aide de la protection d’accès. La valeur par défaut est activée. Il est recommandé de rester activé dans la plupart des cas.
Si vous activez ou ne configurez pas ce paramètre, les fichiers réseau sont analysés.
Si vous désactivez ce paramètre, les fichiers réseau ne sont pas analysés.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Scan- Value name
DisableScanningNetworkFiles
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 0 |
| Disabled | REG_DWORD = 1 |
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Enable
# Enable: WindowsDefender/Scan_DisableScanningNetworkFiles
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Scan'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'DisableScanningNetworkFiles' -Value 0 -Type DWordDisable
# Disable: WindowsDefender/Scan_DisableScanningNetworkFiles
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Scan'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'DisableScanningNetworkFiles' -Value 1 -Type DWordRevert to "Not configured"
# Revert to "Not configured": WindowsDefender/Scan_DisableScanningNetworkFiles
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Scan'
Remove-ItemProperty -Path $k -Name 'DisableScanningNetworkFiles' -ErrorAction SilentlyContinue