Ouvrir dans l'explorateur

Définir le chemin d’accès source par défaut pour Update-Help

Set the default source path for Update-Help

Type
Ordinateur et utilisateur
Chemin GPO
Configuration ordinateur › Stratégies › Modèles d'administration › Composants Windows › Windows PowerShell Configuration utilisateur › Stratégies › Modèles d'administration › Composants Windows › Windows PowerShell EN : Computer Configuration › Policies › Administrative Templates › Windows Components › Windows PowerShellEN : User Configuration › Policies › Administrative Templates › Windows Components › Windows PowerShell
Pris en charge sur
Au moins Microsoft Windows 7 ou famille Windows Server 2008 EN : At least Microsoft Windows 7 or Windows Server 2008 family
Fichier ADMX
PowerShellExecutionPolicy.admx
Nom interne
PowerShellExecutionPolicy/EnableUpdateHelpDefaultSourcePath

Explication

Texte français issu de Windows 11 26H2

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.

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.

Registre

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\PowerShell\UpdatableHelp
HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\PowerShell\UpdatableHelp
Nom de la valeur
EnableUpdateHelpDefaultSourcePath
ÉtatValeur écrite
ActivéREG_DWORD = 1
DésactivéREG_DWORD = 0

PowerShell

Commandes PowerShell qui écrivent dans le registre ce que la stratégie écrirait. Les valeurs entre chevrons (<…>) sont à remplacer.

Écrire directement dans le registre contourne la stratégie de groupe : si une GPO gère cette valeur, elle sera réécrite au prochain gpupdate ; sinon la valeur reste en place (effet « tatouage »). Préférez une GPO ou, en local, LGPO.exe. Exécutez PowerShell en administrateur pour HKLM. Certaines stratégies demandent un redémarrage ou gpupdate /force.

Ordinateur (HKLM)

Activer

# Activer : 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
# Chemin d’accès source par défaut
Set-ItemProperty -Path $k -Name 'DefaultSourcePath' -Value '<valeur>' -Type String

Désactiver

# Désactiver : 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 DWord

Revenir à « Non configuré »

# Revenir à « Non configuré » : 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 SilentlyContinue

Utilisateur (HKCU)

Activer

Désactiver

Revenir à « Non configuré »

Options (1)

LibelléContrôleValeur de registreType REGContraintes / détails
Chemin d’accès source par défautDefault Source PathSourcePathForUpdateHelpZone de textetextDefaultSourcePathREG_SZ
Obligatoire

Disponibilité