Open in the explorer

Windows Defender Firewall: Allow inbound Remote Desktop exceptions

Pare-feu Windows Defender : autoriser les exceptions du Bureau à distance en entrée

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Network › Network Connections › Windows Defender Firewall › Domain Profile FR: Configuration ordinateur › Stratégies › Modèles d'administration › Réseau › Connexions réseau › Pare-feu Windows Defender › Profil du domaine
Supported on
At least Windows XP Professional with SP2 FR: Au minimum Windows XP Professionnel avec SP2
ADMX file
WindowsFirewall.admx
Internal name
WindowsFirewall/WF_RemoteDesktop_Name_1

Explanation

Allows this computer to receive inbound Remote Desktop requests. To do this, Windows Defender Firewall opens TCP port 3389.

If you enable this policy setting, Windows Defender Firewall opens this port so that this computer can receive Remote Desktop requests. You must specify the IP addresses or subnets from which these incoming messages are allowed. In the Windows Defender Firewall component of Control Panel, the "Remote Desktop" check box is selected and administrators cannot clear it.

If you disable this policy setting, Windows Defender Firewall blocks this port, which prevents this computer from receiving Remote Desktop requests. If an administrator attempts to open this port by adding it to a local port exceptions list, Windows Defender Firewall does not open the port. In the Windows Defender Firewall component of Control Panel, the "Remote Desktop" check box is cleared and administrators cannot select it.

If you do not configure this policy setting, Windows Defender Firewall does not open this port. Therefore, the computer cannot receive Remote Desktop requests unless an administrator uses other policy settings to open the port. In the Windows Defender Firewall component of Control Panel, the "Remote Desktop" check box is cleared. Administrators can change this check box."

French text from Windows 11 26H2

Autorise l'ordinateur local à recevoir des demandes du Bureau à distance. Dans ce but, le Pare-feu Windows Defender ouvre le port TCP 3389.

Si vous activez ce paramètre de stratégie, le Pare-feu Windows Defender ouvre ce port pour que l'ordinateur puisse recevoir des requêtes de Bureau à distance. Vous devez spécifier les adresses IP ou les sous-réseaux depuis lesquels les messages entrants sont autorisés. Dans le composant Pare-feu Windows Defender du Panneau de configuration, l'option « Bureau à distance » est sélectionnée et l'administrateur ne peut pas la désélectionner.

Si vous désactivez ce paramètre de stratégie, le Pare-feu Windows Defender bloque ce port, ce qui empêche cet ordinateur de recevoir les requêtes de Bureau à distance. Si un administrateur tente d'ouvrir ce port en l'ajoutant à une liste d'exceptions de ports locaux, le Pare-feu Windows Defender n'ouvre pas le port. Dans le composant Pare-feu Windows Defender du Panneau de configuration, la case à cocher « Bureau à distance » sera désactivée et les administrateurs ne pourront pas l'activer.

Si vous ne configurez pas ce paramètre de stratégie, le Pare-feu Windows Defender n'ouvrira pas ce port. L'ordinateur ne peut donc pas recevoir de requêtes Bureau à distance, sauf si un administrateur utilise d'autres paramètres de stratégie pour ouvrir le port. Dans le composant Pare-feu Windows Defender du Panneau de configuration, l'option « Bureau à distance » est désélectionnée. Les administrateurs pourront modifier cette case à cocher.

Registry

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Services\RemoteDesktop
Value name
Enabled
StateValue written
EnabledREG_DWORD = 1
DisabledREG_DWORD = 0

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: WindowsFirewall/WF_RemoteDesktop_Name_1
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Services\RemoteDesktop'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'Enabled' -Value 1 -Type DWord
# Allow unsolicited incoming messages from these IP addresses
Set-ItemProperty -Path $k -Name 'RemoteAddresses' -Value '<value>' -Type String

Disable

# Disable: WindowsFirewall/WF_RemoteDesktop_Name_1
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Services\RemoteDesktop'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'Enabled' -Value 0 -Type DWord

Revert to "Not configured"

# Revert to "Not configured": WindowsFirewall/WF_RemoteDesktop_Name_1
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Services\RemoteDesktop'
Remove-ItemProperty -Path $k -Name 'Enabled' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'RemoteAddresses' -ErrorAction SilentlyContinue

Options (1)

LabelControlRegistry valueREG typeConstraints / details
Allow unsolicited incoming messages from these IP addresses:Autoriser les messages entrants non sollicités provenant des adresses IP suivantes :WF_Scope_NameText boxtextRemoteAddressesREG_SZ

Availability