Open in the explorer

Assign a default domain for logon

Affecter un domaine par défaut pour l’ouverture de session

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › System › Logon FR: Configuration ordinateur › Stratégies › Modèles d'administration › Système › Ouverture de session
Supported on
At least Windows Vista FR: Au minimum Windows Vista
ADMX file
CredentialProviders.admx
Internal name
CredentialProviders/DefaultLogonDomain

Explanation

This policy setting specifies a default logon domain, which might be a different domain than the domain to which the computer is joined. Without this policy setting, at logon, if a user does not specify a domain for logon, the domain to which the computer belongs is assumed as the default domain. For example if the computer belongs to the Fabrikam domain, the default domain for user logon is Fabrikam.

If you enable this policy setting, the default logon domain is set to the specified domain, which might be different than the domain to which the computer is joined.

If you disable or do not configure this policy setting, the default logon domain is always set to the domain to which the computer is joined.

French text from Windows 11 26H2

Ce paramètre de stratégie spécifie un domaine d’ouverture de session par défaut qui peut être différent du domaine auquel appartient l’ordinateur. Sans ce paramètre de stratégie, si, à l’ouverture d’une session, un utilisateur ne spécifie pas de domaine, le domaine auquel appartient l’ordinateur est considéré comme le domaine par défaut. Par exemple, si l’ordinateur appartient au domaine Fabrikam, le domaine par défaut à l’ouverture de la session est Fabrikam.

Si vous activez ce paramètre de stratégie, le domaine d’ouverture de session par défaut est défini sur le domaine spécifié, lequel peut être différent du domaine auquel l’ordinateur appartient.

Si vous désactivez ou ne configurez pas ce paramètre de stratégie, le domaine d’ouverture de session par défaut est toujours défini sur le domaine auquel l’ordinateur appartient.

Registry

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System
Value name
not defined in the ADMX

Enable / disable values: not defined in the ADMX (see the options below).

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: CredentialProviders/DefaultLogonDomain
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Default Logon domain
Set-ItemProperty -Path $k -Name 'DefaultLogonDomain' -Value '<value>' -Type String

Disable

# Disable: CredentialProviders/DefaultLogonDomain
# No value is written in the "Disabled" state (nothing defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": CredentialProviders/DefaultLogonDomain
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
Remove-ItemProperty -Path $k -Name 'DefaultLogonDomain' -ErrorAction SilentlyContinue

Options (1)

LabelControlRegistry valueREG typeConstraints / details
Default Logon domain:Domaine d’ouverture de session par défaut :DefaultLogonDomain_MessageText boxtextDefaultLogonDomainREG_SZ
Max length: 4096

Availability