Enable Allowed Zones for MSIX Packages
Activez les zones autorisées pour les packages MSIX
Explanation
This policy controls whether MSIX packages originating from specific URL Zones are allowed to install. A package's origin is determined by its URI and whether a Mart-of-the-Web (MotW) is present. If multiple URIs are involved, all of them are considered;
If you enable this policy, users will be able to install MSIX packages according to the configuration for each zone.
If you disable or do not configure this policy, users will be able to install MSIX packages from any zone except for Untrusted.
Cette stratégie contrôle l’installation des packages MSIX provenant de zones URL spécifiques. L’origine d’un package est déterminée par son URI et si un Mart-of-the-Web (MotW) est présent. Si plusieurs URI sont impliqués, tous sont pris en compte ;
Si vous activez cette stratégie, les utilisateurs peuvent installer des packages MSIX en fonction de la configuration de chaque zone.
Si vous désactivez ou ne configurez pas cette stratégie, les utilisateurs peuvent installer des packages MSIX à partir de n’importe quelle zone, sauf pour les packages non approuvés.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Appx\- Value name
EnableMsixAllowedZones
| State | Value written |
|---|---|
| Enabled | not defined in the ADMX (see the options below) |
| Disabled | 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.
The ADMX does not specify the value written when enabled; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled). The commands below use 1/0 as an assumption.
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: AppxPackageManager/EnableMsixAllowedZones
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Appx\'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'EnableMsixAllowedZones' -Value 1 -Type DWord # assumed value (not defined in the ADMX)
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Appx\MsixAllowedZones'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Local Machine
# Possible options:
# Block = 0
# Allow = 1
Set-ItemProperty -Path $k -Name 'LocalMachine' -Value 1 -Type DWord
# Intranet
# Possible options:
# Block = 0
# Allow = 1
Set-ItemProperty -Path $k -Name 'Intranet' -Value 1 -Type DWord
# Trusted Sites
# Possible options:
# Block = 0
# Allow = 1
Set-ItemProperty -Path $k -Name 'TrustedSites' -Value 1 -Type DWord
# Internet
# Possible options:
# Block = 0
# Allow = 1
Set-ItemProperty -Path $k -Name 'Internet' -Value 1 -Type DWord
# Untrusted Sites
# Possible options:
# Block = 0
# Allow = 1
Set-ItemProperty -Path $k -Name 'UntrustedSites' -Value 0 -Type DWordDisable
# Disable: AppxPackageManager/EnableMsixAllowedZones
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Appx\'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'EnableMsixAllowedZones' -Value 0 -Type DWord # assumed value (not defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": AppxPackageManager/EnableMsixAllowedZones
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Appx\'
Remove-ItemProperty -Path $k -Name 'EnableMsixAllowedZones' -ErrorAction SilentlyContinue
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Appx\MsixAllowedZones'
Remove-ItemProperty -Path $k -Name 'LocalMachine' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'Intranet' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'TrustedSites' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'Internet' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'UntrustedSites' -ErrorAction SilentlyContinueOptions (5)
| Label | Control | Registry value | REG type | Constraints / details | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Local MachineOrdinateur localLocalMachine | Drop-down listenum | LocalMachinein Software\Policies\Microsoft\Windows\Appx\MsixAllowedZones | REG_DWORD | Default choice (UI): #1
| ||||||
| IntranetIntranet | Drop-down listenum | Intranetin Software\Policies\Microsoft\Windows\Appx\MsixAllowedZones | REG_DWORD | Default choice (UI): #1
| ||||||
| Trusted SitesSites de confianceTrustedSites | Drop-down listenum | TrustedSitesin Software\Policies\Microsoft\Windows\Appx\MsixAllowedZones | REG_DWORD | Default choice (UI): #1
| ||||||
| InternetInternet | Drop-down listenum | Internetin Software\Policies\Microsoft\Windows\Appx\MsixAllowedZones | REG_DWORD | Default choice (UI): #1
| ||||||
| Untrusted SitesSites non approuvésUntrustedSites | Drop-down listenum | UntrustedSitesin Software\Policies\Microsoft\Windows\Appx\MsixAllowedZones | REG_DWORD | Default choice (UI): #0
|