Open in the explorer

Do not use Remote Desktop Session Host server IP address when virtual IP address is not available

Ne pas utiliser l’adresse IP du serveur hôte de session Bureau à distance lorsque l’adresse IP virtuelle n’est pas disponible

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Windows Components › Remote Desktop Services › Remote Desktop Session Host › Application Compatibility FR: Configuration ordinateur › Stratégies › Modèles d'administration › Composants Windows › Services Bureau à distance › Hôte de la session Bureau à distance › Compatibilité des applications
Supported on
At least Windows Server 2008 R2 FR: Au moins Windows Server 2008 R2
ADMX file
terminalserver-server.admx
Internal name
terminalserver-server/TS_NOT_USE_SERVER_IP_WITH_IP_VIRTUALIZATION

Explanation

This policy setting specifies whether a session uses the IP address of the Remote Desktop Session Host server if a virtual IP address is not available.

If you enable this policy setting, the IP address of the RD Session Host server is not used if a virtual IP is not available. The session will not have network connectivity.

If you disable or do not configure this policy setting, the IP address of the RD Session Host server is used if a virtual IP is not available.

French text from Windows 11 26H2

Ce paramètre de stratégie indique si une session utilise l’adresse IP du serveur hôte de session Bureau à distance lorsqu’une adresse IP virtuelle n’est pas disponible.

Si vous activez ce paramètre de stratégie, l’adresse IP du serveur hôte de session Bureau à distance n’est utilisée qu’à condition qu’une adresse IP virtuelle soit disponible. La session n’aura pas de connectivité réseau.

Si vous désactivez ou ne configurez pas ce paramètre, l’adresse IP du serveur hôte de session Bureau à distance est utilisée en cas d’indisponibilité d’une adresse IP virtuelle.

Registry

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\TSAppSrv\VirtualIP
Value name
PromptOnIPLeaseFail
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: terminalserver-server/TS_NOT_USE_SERVER_IP_WITH_IP_VIRTUALIZATION
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\TSAppSrv\VirtualIP'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'PromptOnIPLeaseFail' -Value 1 -Type DWord

Disable

# Disable: terminalserver-server/TS_NOT_USE_SERVER_IP_WITH_IP_VIRTUALIZATION
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\TSAppSrv\VirtualIP'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'PromptOnIPLeaseFail' -Value 0 -Type DWord

Revert to "Not configured"

# Revert to "Not configured": terminalserver-server/TS_NOT_USE_SERVER_IP_WITH_IP_VIRTUALIZATION
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\TSAppSrv\VirtualIP'
Remove-ItemProperty -Path $k -Name 'PromptOnIPLeaseFail' -ErrorAction SilentlyContinue

Availability