Turn on dynamic Content URI Rules for packaged Microsoft Store apps
Activer les règles d’URI de contenu dynamique pour les applications empaquetées du Microsoft Store
Explanation
This policy setting lets you turn on Content URI Rules to supplement the static Content URI Rules that were defined as part of the app manifest and apply to all packaged Microsoft Store apps that use the enterpriseAuthentication capability on a computer.
If you enable this policy setting, you can define additional Content URI Rules that all packaged Microsoft Store apps that use the enterpriseAuthentication capability on a computer can use.
If you disable or don't set this policy setting, packaged Microsoft Store apps will only use the static Content URI Rules.
Ce paramètre de stratégie vous permet d’activer des règles d’URI de contenu en complément des règles d’URI de contenu statique qui ont été définies dans le cadre du manifeste d’application et de les appliquer à toutes les applications empaquetées du Microsoft Store qui utilisent la fonctionnalité enterpriseAuthentication sur un ordinateur.
Si vous activez ce paramètre de stratégie, vous pouvez définir des règles d’URI de contenu supplémentaires utilisables par toutes les applications empaquetées du Microsoft Store qui utilisent la fonctionnalité enterpriseAuthentication sur un ordinateur.
Si vous désactivez ce paramètre de stratégie ou si vous ne le configurez pas, les applications empaquetées du Microsoft Store utilisent uniquement les règles d’URI de contenu statique.
Registry
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Packages\Applications- Value name
EnableDynamicContentUriRules
| 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.
Enable
# Enable: AppXRuntime/AppxRuntimeApplicationContentUriRules
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Packages\Applications'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'EnableDynamicContentUriRules' -Value 1 -Type DWord
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Packages\Applications\ContentUriRules'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Content URI Rules
# Non-additive list: existing values of the key are cleared first
if (Test-Path -Path $k) { (Get-Item -Path $k).Property | ForEach-Object { Remove-ItemProperty -Path $k -Name ([WildcardPattern]::Escape($_)) -ErrorAction SilentlyContinue } }
$values = @('<value1>', '<value2>') # Replace the values with your own
$i = 1
foreach ($v in $values) { Set-ItemProperty -Path $k -Name ('' + $i) -Value $v -Type String; $i++ }Disable
# Disable: AppXRuntime/AppxRuntimeApplicationContentUriRules
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Packages\Applications'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'EnableDynamicContentUriRules' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": AppXRuntime/AppxRuntimeApplicationContentUriRules
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Packages\Applications'
Remove-ItemProperty -Path $k -Name 'EnableDynamicContentUriRules' -ErrorAction SilentlyContinue
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Packages\Applications\ContentUriRules'
Remove-Item -Path $k -Recurse -Force -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details |
|---|---|---|---|---|
| Content URI Rules:Règles d’URI de contenu :ListBox_ContentUriRules | List (table)list | Software\Microsoft\Windows\CurrentVersion\Policies\Packages\Applications\ContentUriRulesValues named “” + number | REG_SZ (values under the key) |