Open in the explorer

Require domain users to elevate when setting a network's location

Exiger des utilisateurs du domaine qu'ils procèdent à une élévation lors de la définition d'un emplacement réseau

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Network › Network Connections FR: Configuration ordinateur › Stratégies › Modèles d'administration › Réseau › Connexions réseau
Supported on
At least Windows Server 2008 R2 or Windows 7 FR: Au minimum Windows Server 2008 R2 ou Windows 7
ADMX file
NetworkConnections.admx
Internal name
NetworkConnections/NC_StdDomainUserSetLocation

Explanation

This policy setting determines whether to require domain users to elevate when setting a network's location.

If you enable this policy setting, domain users must elevate when setting a network's location.

If you disable or do not configure this policy setting, domain users can set a network's location without elevating.

French text from Windows 11 26H2

Ce paramètre de stratégie détermine si les utilisateurs doivent procéder à une élévation lors de la définition d'un emplacement réseau.

Si vous activez ce paramètre de stratégie, les utilisateurs du domaine doivent procéder à une élévation lorsqu'ils définissent un emplacement réseau.

Si vous désactivez ou ne configurez pas ce paramètre, les utilisateurs du domaine peuvent définir un emplacement réseau sans procéder à une élévation.

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Network Connections
Value name
NC_StdDomainUserSetLocation
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: NetworkConnections/NC_StdDomainUserSetLocation
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Network Connections'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'NC_StdDomainUserSetLocation' -Value 1 -Type DWord

Disable

# Disable: NetworkConnections/NC_StdDomainUserSetLocation
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Network Connections'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'NC_StdDomainUserSetLocation' -Value 0 -Type DWord

Revert to "Not configured"

# Revert to "Not configured": NetworkConnections/NC_StdDomainUserSetLocation
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Network Connections'
Remove-ItemProperty -Path $k -Name 'NC_StdDomainUserSetLocation' -ErrorAction SilentlyContinue

Availability