Set the default source path for Update-Help
Définir le chemin d’accès source par défaut pour Update-Help
Explanation
This policy setting allows you to set the default value of the SourcePath parameter on the Update-Help cmdlet.
If you enable this policy setting, the Update-Help cmdlet will use the specified value as the default value for the SourcePath parameter. This default value can be overridden by specifying a different value with the SourcePath parameter on the Update-Help cmdlet.
If this policy setting is disabled or not configured, this policy setting does not set a default value for the SourcePath parameter of the Update-Help cmdlet.
Note: This policy setting exists under both Computer Configuration and User Configuration in the Group Policy Editor. The Computer Configuration policy setting takes precedence over the User Configuration policy setting.
Ce paramètre de stratégie vous permet de définir la valeur par défaut du paramètre SourcePath dans l’applet de commande Update-Help.
Si vous activez ce paramètre de stratégie, l’applet de commande Update-Help utilise alors la valeur indiquée comme valeur par défaut pour le paramètre SourcePath. Vous pouvez remplacer cette valeur par défaut en indiquant une autre valeur pour le paramètre SourcePath à l’aide de l’applet de commande Update-Help.
Si ce paramètre de stratégie est désactivé ou n’est pas configuré, il ne définit pas de valeur par défaut pour le paramètre SourcePath de l’applet de commande Update-Help.
Remarque : ce paramètre de stratégie est présent sous Configuration ordinateur et Configuration utilisateur dans l’Éditeur d’objets de stratégie de groupe. Le paramètre de stratégie de Configuration ordinateur a priorité sur celui de Configuration utilisateur.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\PowerShell\UpdatableHelpHKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\PowerShell\UpdatableHelp- Value name
EnableUpdateHelpDefaultSourcePath
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_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.
Computer (HKLM)
Enable
# Enable: PowerShellExecutionPolicy/EnableUpdateHelpDefaultSourcePath
$k = 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell\UpdatableHelp'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'EnableUpdateHelpDefaultSourcePath' -Value 1 -Type DWord
# Default Source Path
Set-ItemProperty -Path $k -Name 'DefaultSourcePath' -Value '<value>' -Type StringDisable
# Disable: PowerShellExecutionPolicy/EnableUpdateHelpDefaultSourcePath
$k = 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell\UpdatableHelp'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'EnableUpdateHelpDefaultSourcePath' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": PowerShellExecutionPolicy/EnableUpdateHelpDefaultSourcePath
$k = 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell\UpdatableHelp'
Remove-ItemProperty -Path $k -Name 'EnableUpdateHelpDefaultSourcePath' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'DefaultSourcePath' -ErrorAction SilentlyContinueUser (HKCU)
Enable
Disable
Revert to "Not configured"
Options (1)
| Label | Control | Registry value | REG type | Constraints / details |
|---|---|---|---|---|
| Default Source PathChemin d’accès source par défautSourcePathForUpdateHelp | Text boxtext | DefaultSourcePath | REG_SZ | Required |