Set Cost
Définir le coût
Explanation
This policy setting configures the cost of Wireless LAN (WLAN) connections on the local machine.
If this policy setting is enabled, a drop-down list box presenting possible cost values will be active. Selecting one of the following values from the list will set the cost of all WLAN connections on the local machine:
- Unrestricted: Use of this connection is unlimited and not restricted by usage charges and capacity constraints.
- Fixed: Use of this connection is not restricted by usage charges and capacity constraints up to a certain data limit.
- Variable: This connection is costed on a per byte basis.
If this policy setting is disabled or is not configured, the cost of Wireless LAN connections is Unrestricted by default.
Ce paramètre de stratégie configure le coût des connexions au réseau local sans fil (WLAN, Wireless LAN) sur l’ordinateur local.
Si ce paramètre de stratégie est activé, une liste déroulante contenant les valeurs de coût possibles est activée. La sélection d’une des valeurs suivantes dans la liste définit le coût de toutes les connexions WLAN sur l’ordinateur local :
- Non restreint : l’utilisation de cette connexion est illimitée et n’est pas restreinte par les frais d’utilisation et les contraintes de capacité.
- Fixe : l’utilisation de cette connexion n’est pas limitée par les frais d’utilisation et les contraintes de capacité jusqu’à une limite de données définie.
- Variable : cette connexion est facturée par octet.
Si vous désactivez ce paramètre de stratégie ou ne le configurez pas, le coût des connexions WLAN est non restreint par défaut.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Wireless\NetCost- 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: wlansvc/SetCost
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Wireless\NetCost'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Please select a wlan connection cost value to set
# Possible options:
# Unrestricted = 1
# Fixed = 2
# Variable = 3
Set-ItemProperty -Path $k -Name 'Cost' -Value 1 -Type DWordDisable
# Disable: wlansvc/SetCost
# No value is written in the "Disabled" state (nothing defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": wlansvc/SetCost
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Wireless\NetCost'
Remove-ItemProperty -Path $k -Name 'Cost' -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Please select a wlan connection cost value to set:Sélectionnez une valeur de coût de connexion WLAN à définir :Cost_Dropdownlist | Drop-down listenum | Cost | REG_DWORD | Required · Default choice (UI): #0
|