Open in the explorer

Custom Commands

Commandes personnalisées

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Network › DirectAccess Client Experience Settings FR: Configuration ordinateur › Stratégies › Modèles d'administration › Réseau › Paramètres d’expérience utilisateur des clients DirectAccess
Supported on
At least Windows Server 2008 R2 or Windows 7 FR: Au minimum Windows Server 2008 R2 ou Windows 7
ADMX file
nca.admx
Internal name
nca/CustomCommands

Explanation

Specifies commands configured by the administrator for custom logging. These commands will run in addition to default log commands.

French text from Windows 11 26H2

Indique les commandes configurées par l’administrateur pour la journalisation personnalisée. Ces commandes s’exécutent en plus des commandes de journalisation par défaut.

Registry

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkConnectivityAssistant\CustomCommands
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: nca/CustomCommands
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\NetworkConnectivityAssistant\CustomCommands'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# CustomCommands
$values = @('<value1>', '<value2>')  # Replace the values with your own
foreach ($v in $values) { Set-ItemProperty -Path $k -Name $v -Value $v -Type String }

Disable

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

Revert to "Not configured"

# Revert to "Not configured": nca/CustomCommands
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\NetworkConnectivityAssistant\CustomCommands'
# names to adapt
# Remove-ItemProperty -Path $k -Name '<name1>' -ErrorAction SilentlyContinue

Options (1)

LabelControlRegistry valueREG typeConstraints / details
CustomCommandsCustomCommands_ControlList (table)listSOFTWARE\Policies\Microsoft\Windows\NetworkConnectivityAssistant\CustomCommandsNumbered values (1, 2, 3…) · additiveREG_SZ (values under the key)

Availability