Ouvrir dans l'explorateur

Enable Windows Package Manager Allowed Sources

Cette stratégie n'a pas de traduction française dans les modèles de l'éditeur ; le texte original est en anglais.

Type
Ordinateur
Chemin GPO
Configuration ordinateur › Stratégies › Modèles d'administration › Desktop App Installer EN : Computer Configuration › Policies › Administrative Templates › Desktop App Installer
Pris en charge sur
At least Windows Server 2016, Windows 10 Version 1809
Fichier ADMX
DesktopAppInstaller.admx
Nom interne
DesktopAppInstaller/EnableAllowedSources

Explication

This policy controls additional sources allowed by the enterprise IT administrator.

If you do not configure this policy, users will be able to add or remove additional sources other than those configured by policy.

If you enable this policy, only the sources specified can be added or removed from the Windows Package Manager. The representation for each allowed source can be obtained from installed sources using 'winget source export'.

If you disable this policy, no additional sources can be configured for the Windows Package Manager.

Registre

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\AppInstaller
Nom de la valeur
EnableAllowedSources
É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.

Activer

# Activer : DesktopAppInstaller/EnableAllowedSources
$k = 'HKLM:\Software\Policies\Microsoft\Windows\AppInstaller'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'EnableAllowedSources' -Value 1 -Type DWord
$k = 'HKLM:\Software\Policies\Microsoft\Windows\AppInstaller\AllowedSources'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Allowed Sources
# Liste non additive : les valeurs existantes de la clé sont d'abord effacées
if (Test-Path -Path $k) { (Get-Item -Path $k).Property | ForEach-Object { Remove-ItemProperty -Path $k -Name ([WildcardPattern]::Escape($_)) -ErrorAction SilentlyContinue } }
$values = @('<valeur1>', '<valeur2>')  # Remplacez les valeurs par les vôtres
$i = 1
foreach ($v in $values) { Set-ItemProperty -Path $k -Name ('' + $i) -Value $v -Type String; $i++ }

Désactiver

# Désactiver : DesktopAppInstaller/EnableAllowedSources
$k = 'HKLM:\Software\Policies\Microsoft\Windows\AppInstaller'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'EnableAllowedSources' -Value 0 -Type DWord

Revenir à « Non configuré »

# Revenir à « Non configuré » : DesktopAppInstaller/EnableAllowedSources
$k = 'HKLM:\Software\Policies\Microsoft\Windows\AppInstaller'
Remove-ItemProperty -Path $k -Name 'EnableAllowedSources' -ErrorAction SilentlyContinue
$k = 'HKLM:\Software\Policies\Microsoft\Windows\AppInstaller\AllowedSources'
Remove-Item -Path $k -Recurse -Force -ErrorAction SilentlyContinue

Options (1)

LibelléContrôleValeur de registreType REGContraintes / détails
Allowed Sources:AllowedSourcesListe (tableau)listSoftware\Policies\Microsoft\Windows\AppInstaller\AllowedSourcesValeurs nommées « » + n°REG_SZ (valeurs sous la clé)

Application

WinGet (App Installer) (Microsoft) — modèles d'octobre 2026

Modèles d'octobre 2026 issus de pl4nty/web-admx-tool.