Modèle de zones Sites sensibles
Vérifié avec Windows 11 25H2 — mis à jour le 30 juillet 2026
Pris en charge sur : Au minimum Internet Explorer 6.0 dans Windows XP avec Service Pack 2 ou Windows Server 2003 avec Service Pack 1
Chemin dans la console GPO
Configuration ordinateur\Modèles d'administration\Composants Windows\Internet Explorer\Panneau de configuration Internet\Onglet Sécurité Configuration utilisateur\Modèles d'administration\Composants Windows\Internet Explorer\Panneau de configuration Internet\Onglet Sécurité Description
Ce paramètre de stratégie de modèle vous permet de configurer des paramètres de stratégie dans cette zone de façon adaptée au niveau de sécurité sélectionné, par exemple Bas, Moyennement bas, Moyen ou Élevé. Si vous activez ce paramètre de stratégie de modèle et sélectionnez un niveau de sécurité, toutes les valeurs des paramètres individuels de la zone sont remplacées par les valeurs par défaut du modèle standard. Si vous désactivez ce paramètre de stratégie, aucun niveau de sécurité n’est configuré. Si vous ne configurez pas ce paramètre de stratégie, aucun niveau de sécurité n’est configuré. Remarque. Le Verrouillage de la zone Ordinateur local et le Verrouillage des protocoles réseau comparent les paramètres de la zone de l’URL active et ceux de la zone verrouillée correspondante. Si vous sélectionnez un niveau de sécurité pour une zone (y compris aucune sécurité), cette modification doit être appliquée à son équivalent verrouillé. Remarque. Il est recommandé de configurer les paramètres de stratégie de modèles dans un objet GPO et de configurer les paramètres de stratégie associés dans un objet GPO distinct. Vous pouvez alors utiliser les fonctionnalités de gestion des stratégies de groupes (par exemple, précédence, héritage ou application) pour appliquer des paramètres spécifiques à des cibles précises.
Registre
Software\Policies\Microsoft\Windows\CurrentVersion\Restricted Sites Settings\Template Policies Software\Policies\Microsoft\Windows\CurrentVersion\Restricted Sites Settings\Template Policies Nom de valeur : RestrictedSitesZoneTemplate
Activé : RestrictedSitesZoneTemplate = 1
Désactivé : RestrictedSitesZoneTemplate = 0
Cette stratégie définit plusieurs valeurs de registre :
1001 4 1001 = (non défini) 1001 = (supprimée) 1004 4 1004 = (non défini) 1004 = (supprimée) 1200 4 1200 = (non défini) 1200 = (supprimée) 1201 4 1201 = (non défini) 1201 = (supprimée) 1206 4 1206 = (non défini) 1206 = (supprimée) 1207 4 1207 = (non défini) 1207 = (supprimée) 1208 4 1208 = (non défini) 1208 = (supprimée) 1209 4 1209 = (non défini) 1209 = (supprimée) 120a 4 120a = (non défini) 120a = (supprimée) 120b 4 120b = (non défini) 120b = (supprimée) 120c 4 120c = (non défini) 120c = (supprimée) 1400 4 1400 = (non défini) 1400 = (supprimée) 1402 4 1402 = (non défini) 1402 = (supprimée) 1405 4 1405 = (non défini) 1405 = (supprimée) 1406 4 1406 = (non défini) 1406 = (supprimée) 1407 4 1407 = (non défini) 1407 = (supprimée) 1409 4 1409 = (non défini) 1409 = (supprimée) 1601 4 1601 = (non défini) 1601 = (supprimée) 1604 4 1604 = (non défini) 1604 = (supprimée) 1605 4 1605 = (non défini) 1605 = (supprimée) 1606 4 1606 = (non défini) 1606 = (supprimée) 1607 4 1607 = (non défini) 1607 = (supprimée) 1608 4 1608 = (non défini) 1608 = (supprimée) 1609 4 1609 = (non défini) 1609 = (supprimée) 160A 4 160A = (non défini) 160A = (supprimée) 1800 4 1800 = (non défini) 1800 = (supprimée) 1802 4 1802 = (non défini) 1802 = (supprimée) 1803 4 1803 = (non défini) 1803 = (supprimée) 1804 4 1804 = (non défini) 1804 = (supprimée) 1807 4 1807 = (non défini) 1807 = (supprimée) 1808 4 1808 = (non défini) 1808 = (supprimée) 1809 4 1809 = (non défini) 1809 = (supprimée) 180a 4 180a = (non défini) 180a = (supprimée) 180b 4 180b = (non défini) 180b = (supprimée) 1a00 4 1a00 = (non défini) 1a00 = (supprimée) 1a02 4 1a02 = (non défini) 1a02 = (supprimée) 1a03 4 1a03 = (non défini) 1a03 = (supprimée) 1a04 4 1a04 = (non défini) 1a04 = (supprimée) 1a05 4 1a05 = (non défini) 1a05 = (supprimée) 1a06 4 1a06 = (non défini) 1a06 = (supprimée) 1c00 4 1c00 = (non défini) 1c00 = (supprimée) 1e05 4 1e05 = (non défini) 1e05 = (supprimée) 2000 4 2000 = (non défini) 2000 = (supprimée) 2001 4 2001 = (non défini) 2001 = (supprimée) 2004 4 2004 = (non défini) 2004 = (supprimée) 2005 4 2005 = (non défini) 2005 = (supprimée) 2100 4 2100 = (non défini) 2100 = (supprimée) 2101 4 2101 = (non défini) 2101 = (supprimée) 2102 4 2102 = (non défini) 2102 = (supprimée) 2103 4 2103 = (non défini) 2103 = (supprimée) 2104 4 2104 = (non défini) 2104 = (supprimée) 2105 4 2105 = (non défini) 2105 = (supprimée) 2106 4 2106 = (non défini) 2106 = (supprimée) 2200 4 2200 = (non défini) 2200 = (supprimée) 2201 4 2201 = (non défini) 2201 = (supprimée) 2300 4 2300 = (non défini) 2300 = (supprimée) 2301 4 2301 = (non défini) 2301 = (supprimée) 2400 4 2400 = (non défini) 2400 = (supprimée) 2401 4 2401 = (non défini) 2401 = (supprimée) 2402 4 2402 = (non défini) 2402 = (supprimée) 2500 4 2500 = (non défini) 2500 = (supprimée) 2600 4 2600 = (non défini) 2600 = (supprimée) 2700 4 2700 = (non défini) 2700 = (supprimée) MDM / Intune (CSP)
./Device/Vendor/MSFT/Policy/Config/InternetExplorer/AllowsRestrictedSitesZoneTemplate ./User/Vendor/MSFT/Policy/Config/InternetExplorer/AllowsRestrictedSitesZoneTemplate Documentation Microsoft Learn Données de correspondance : Microsoft Learn (CC BY 4.0)
Générateur d'exports
BETAConfigurez l'état, la portée et les options, puis générez les sorties .reg, PowerShell, Intune et SCCM — ou ajoutez le paramètre à une collection multi-paramètres.
Ces exports écrivent le registre — ce n'est pas une GPO managée. ⓘ
Appliquer les deux portées crée une configuration ambiguë (la portée ordinateur prévaut sur la portée utilisateur). Ne le faites que volontairement.
Fichier .reg
Windows Registry Editor Version 5.00
; Exported from gporais.com
; Policy: Modèle de zones Sites sensibles
; State: Enabled
; Scope: Computer (HKLM)
; Supported on: Au minimum Internet Explorer 6.0 dans Windows XP avec Service Pack 2 ou Windows Server 2003 avec Service Pack 1
[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\CurrentVersion\Restricted Sites Settings\Template Policies]
"RestrictedSitesZoneTemplate"=dword:00000001
"Restricted Sites"=dword:00000004
[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4]
; "1001" = (not defined)
; "1004" = (not defined)
; "1200" = (not defined)
; "1201" = (not defined)
; "1206" = (not defined)
; "1207" = (not defined)
; "1208" = (not defined)
; "1209" = (not defined)
; "120a" = (not defined)
; "120b" = (not defined)
; "120c" = (not defined)
; "1400" = (not defined)
; "1402" = (not defined)
; "1405" = (not defined)
; "1406" = (not defined)
; "1407" = (not defined)
; "1409" = (not defined)
; "1601" = (not defined)
; "1604" = (not defined)
; "1605" = (not defined)
; "1606" = (not defined)
; "1607" = (not defined)
; "1608" = (not defined)
; "1609" = (not defined)
; "160A" = (not defined)
; "1800" = (not defined)
; "1802" = (not defined)
; "1803" = (not defined)
; "1804" = (not defined)
; "1807" = (not defined)
; "1808" = (not defined)
; "1809" = (not defined)
; "180a" = (not defined)
; "180b" = (not defined)
; "1a00" = (not defined)
; "1a02" = (not defined)
; "1a03" = (not defined)
; "1a04" = (not defined)
; "1a05" = (not defined)
; "1a06" = (not defined)
; "1c00" = (not defined)
; "1e05" = (not defined)
; "2000" = (not defined)
; "2001" = (not defined)
; "2004" = (not defined)
; "2005" = (not defined)
; "2100" = (not defined)
; "2101" = (not defined)
; "2102" = (not defined)
; "2103" = (not defined)
; "2104" = (not defined)
; "2105" = (not defined)
; "2106" = (not defined)
; "2200" = (not defined)
; "2201" = (not defined)
; "2300" = (not defined)
; "2301" = (not defined)
; "2400" = (not defined)
; "2401" = (not defined)
; "2402" = (not defined)
; "2500" = (not defined)
; "2600" = (not defined)
; "2700" = (not defined) Autres formats (PowerShell, Intune, SCCM)
PowerShell
# Exported from gporais.com
# Policy: Modèle de zones Sites sensibles
# State: Enabled
# Scope: Computer (HKLM)
# Supported on: Au minimum Internet Explorer 6.0 dans Windows XP avec Service Pack 2 ou Windows Server 2003 avec Service Pack 1
$path = 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Restricted Sites Settings\Template Policies'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'RestrictedSitesZoneTemplate' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'Restricted Sites' -Value 4 -Type DWord
$path = 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4'
# 1001 = (not defined)
# 1004 = (not defined)
# 1200 = (not defined)
# 1201 = (not defined)
# 1206 = (not defined)
# 1207 = (not defined)
# 1208 = (not defined)
# 1209 = (not defined)
# 120a = (not defined)
# 120b = (not defined)
# 120c = (not defined)
# 1400 = (not defined)
# 1402 = (not defined)
# 1405 = (not defined)
# 1406 = (not defined)
# 1407 = (not defined)
# 1409 = (not defined)
# 1601 = (not defined)
# 1604 = (not defined)
# 1605 = (not defined)
# 1606 = (not defined)
# 1607 = (not defined)
# 1608 = (not defined)
# 1609 = (not defined)
# 160A = (not defined)
# 1800 = (not defined)
# 1802 = (not defined)
# 1803 = (not defined)
# 1804 = (not defined)
# 1807 = (not defined)
# 1808 = (not defined)
# 1809 = (not defined)
# 180a = (not defined)
# 180b = (not defined)
# 1a00 = (not defined)
# 1a02 = (not defined)
# 1a03 = (not defined)
# 1a04 = (not defined)
# 1a05 = (not defined)
# 1a06 = (not defined)
# 1c00 = (not defined)
# 1e05 = (not defined)
# 2000 = (not defined)
# 2001 = (not defined)
# 2004 = (not defined)
# 2005 = (not defined)
# 2100 = (not defined)
# 2101 = (not defined)
# 2102 = (not defined)
# 2103 = (not defined)
# 2104 = (not defined)
# 2105 = (not defined)
# 2106 = (not defined)
# 2200 = (not defined)
# 2201 = (not defined)
# 2300 = (not defined)
# 2301 = (not defined)
# 2400 = (not defined)
# 2401 = (not defined)
# 2402 = (not defined)
# 2500 = (not defined)
# 2600 = (not defined)
# 2700 = (not defined) Intune XML
OMA-URI: ./Device/Vendor/MSFT/Policy/Config/InternetExplorer/AllowsRestrictedSitesZoneTemplate
Data type: String
Value:
<enabled/>
<data id="IZ_PartnameRestrictedSitesZoneTemplate" value="4"/> Intune Remediation
# === Detection script ===
# Exported from gporais.com
# Policy: Modèle de zones Sites sensibles
# State: Enabled
# Scope: Computer (HKLM)
# Supported on: Au minimum Internet Explorer 6.0 dans Windows XP avec Service Pack 2 ou Windows Server 2003 avec Service Pack 1
function Test-RegistryValue {
param(
[Parameter(Mandatory = $true)][string]$Path,
[Parameter(Mandatory = $true)][string]$Name,
[object]$Expected,
[ValidateSet('String', 'DWord', 'MultiString')][string]$Kind = 'String',
[switch]$Absent
)
try {
$item = Get-ItemProperty -LiteralPath $Path -Name $Name -ErrorAction Stop
} catch {
return $Absent.IsPresent
}
if ($Absent.IsPresent) { return $false }
$actual = $item.$Name
if ($Kind -eq 'DWord') { return ([int64]$actual) -eq ([int64]$Expected) }
if ($Kind -eq 'MultiString') {
$actualValues = @($actual)
$expectedValues = @($Expected)
if ($actualValues.Count -ne $expectedValues.Count) { return $false }
for ($i = 0; $i -lt $expectedValues.Count; $i++) {
if ([string]$actualValues[$i] -ne [string]$expectedValues[$i]) { return $false }
}
return $true
}
return [string]$actual -eq [string]$Expected
}
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1001: 1001= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1004: 1004= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1200: 1200= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1201: 1201= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1206: 1206= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1207: 1207= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1208: 1208= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1209: 1209= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\120a: 120a= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\120b: 120b= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\120c: 120c= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1400: 1400= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1402: 1402= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1405: 1405= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1406: 1406= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1407: 1407= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1409: 1409= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1601: 1601= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1604: 1604= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1605: 1605= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1606: 1606= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1607: 1607= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1608: 1608= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1609: 1609= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\160A: 160A= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1800: 1800= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1802: 1802= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1803: 1803= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1804: 1804= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1807: 1807= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1808: 1808= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1809: 1809= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\180a: 180a= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\180b: 180b= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1a00: 1a00= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1a02: 1a02= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1a03: 1a03= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1a04: 1a04= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1a05: 1a05= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1a06: 1a06= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1c00: 1c00= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1e05: 1e05= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2000: 2000= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2001: 2001= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2004: 2004= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2005: 2005= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2100: 2100= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2101: 2101= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2102: 2102= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2103: 2103= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2104: 2104= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2105: 2105= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2106: 2106= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2200: 2200= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2201: 2201= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2300: 2300= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2301: 2301= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2400: 2400= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2401: 2401= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2402: 2402= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2500: 2500= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2600: 2600= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2700: 2700= is not representable as a registry value.
$checks = @(
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Restricted Sites Settings\Template Policies' -Name 'RestrictedSitesZoneTemplate' -Expected 1 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Restricted Sites Settings\Template Policies' -Name 'Restricted Sites' -Expected 4 -Kind DWord)
)
if ($checks -notcontains $false) {
Write-Output 'Compliant'
exit 0
}
Write-Output 'Non-compliant'
exit 1
# === Remediation script ===
# Exported from gporais.com
# Policy: Modèle de zones Sites sensibles
# State: Enabled
# Scope: Computer (HKLM)
# Supported on: Au minimum Internet Explorer 6.0 dans Windows XP avec Service Pack 2 ou Windows Server 2003 avec Service Pack 1
$path = 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Restricted Sites Settings\Template Policies'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'RestrictedSitesZoneTemplate' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'Restricted Sites' -Value 4 -Type DWord
$path = 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4'
# 1001 = (not defined)
# 1004 = (not defined)
# 1200 = (not defined)
# 1201 = (not defined)
# 1206 = (not defined)
# 1207 = (not defined)
# 1208 = (not defined)
# 1209 = (not defined)
# 120a = (not defined)
# 120b = (not defined)
# 120c = (not defined)
# 1400 = (not defined)
# 1402 = (not defined)
# 1405 = (not defined)
# 1406 = (not defined)
# 1407 = (not defined)
# 1409 = (not defined)
# 1601 = (not defined)
# 1604 = (not defined)
# 1605 = (not defined)
# 1606 = (not defined)
# 1607 = (not defined)
# 1608 = (not defined)
# 1609 = (not defined)
# 160A = (not defined)
# 1800 = (not defined)
# 1802 = (not defined)
# 1803 = (not defined)
# 1804 = (not defined)
# 1807 = (not defined)
# 1808 = (not defined)
# 1809 = (not defined)
# 180a = (not defined)
# 180b = (not defined)
# 1a00 = (not defined)
# 1a02 = (not defined)
# 1a03 = (not defined)
# 1a04 = (not defined)
# 1a05 = (not defined)
# 1a06 = (not defined)
# 1c00 = (not defined)
# 1e05 = (not defined)
# 2000 = (not defined)
# 2001 = (not defined)
# 2004 = (not defined)
# 2005 = (not defined)
# 2100 = (not defined)
# 2101 = (not defined)
# 2102 = (not defined)
# 2103 = (not defined)
# 2104 = (not defined)
# 2105 = (not defined)
# 2106 = (not defined)
# 2200 = (not defined)
# 2201 = (not defined)
# 2300 = (not defined)
# 2301 = (not defined)
# 2400 = (not defined)
# 2401 = (not defined)
# 2402 = (not defined)
# 2500 = (not defined)
# 2600 = (not defined)
# 2700 = (not defined) Scripts SCCM
# Exported from gporais.com
# Policy: Modèle de zones Sites sensibles
# State: Enabled
# Scope: Computer (HKLM)
# Supported on: Au minimum Internet Explorer 6.0 dans Windows XP avec Service Pack 2 ou Windows Server 2003 avec Service Pack 1
# SCCM Configuration Item guidance:
# Create a Configuration Item of type "Setting: Script".
# Discovery script: use the Detection script below.
# Remediation script: use the Remediation script below.
# Compliance rule: the Discovery script output equals 'Compliant'.
# === Detection script ===
# Exported from gporais.com
# Policy: Modèle de zones Sites sensibles
# State: Enabled
# Scope: Computer (HKLM)
# Supported on: Au minimum Internet Explorer 6.0 dans Windows XP avec Service Pack 2 ou Windows Server 2003 avec Service Pack 1
function Test-RegistryValue {
param(
[Parameter(Mandatory = $true)][string]$Path,
[Parameter(Mandatory = $true)][string]$Name,
[object]$Expected,
[ValidateSet('String', 'DWord', 'MultiString')][string]$Kind = 'String',
[switch]$Absent
)
try {
$item = Get-ItemProperty -LiteralPath $Path -Name $Name -ErrorAction Stop
} catch {
return $Absent.IsPresent
}
if ($Absent.IsPresent) { return $false }
$actual = $item.$Name
if ($Kind -eq 'DWord') { return ([int64]$actual) -eq ([int64]$Expected) }
if ($Kind -eq 'MultiString') {
$actualValues = @($actual)
$expectedValues = @($Expected)
if ($actualValues.Count -ne $expectedValues.Count) { return $false }
for ($i = 0; $i -lt $expectedValues.Count; $i++) {
if ([string]$actualValues[$i] -ne [string]$expectedValues[$i]) { return $false }
}
return $true
}
return [string]$actual -eq [string]$Expected
}
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1001: 1001= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1004: 1004= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1200: 1200= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1201: 1201= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1206: 1206= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1207: 1207= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1208: 1208= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1209: 1209= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\120a: 120a= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\120b: 120b= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\120c: 120c= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1400: 1400= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1402: 1402= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1405: 1405= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1406: 1406= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1407: 1407= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1409: 1409= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1601: 1601= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1604: 1604= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1605: 1605= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1606: 1606= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1607: 1607= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1608: 1608= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1609: 1609= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\160A: 160A= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1800: 1800= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1802: 1802= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1803: 1803= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1804: 1804= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1807: 1807= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1808: 1808= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1809: 1809= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\180a: 180a= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\180b: 180b= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1a00: 1a00= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1a02: 1a02= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1a03: 1a03= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1a04: 1a04= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1a05: 1a05= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1a06: 1a06= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1c00: 1c00= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1e05: 1e05= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2000: 2000= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2001: 2001= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2004: 2004= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2005: 2005= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2100: 2100= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2101: 2101= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2102: 2102= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2103: 2103= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2104: 2104= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2105: 2105= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2106: 2106= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2200: 2200= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2201: 2201= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2300: 2300= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2301: 2301= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2400: 2400= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2401: 2401= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2402: 2402= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2500: 2500= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2600: 2600= is not representable as a registry value.
# HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\2700: 2700= is not representable as a registry value.
$checks = @(
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Restricted Sites Settings\Template Policies' -Name 'RestrictedSitesZoneTemplate' -Expected 1 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Restricted Sites Settings\Template Policies' -Name 'Restricted Sites' -Expected 4 -Kind DWord)
)
if ($checks -notcontains $false) {
Write-Output 'Compliant'
exit 0
}
Write-Output 'Non-compliant'
exit 1
# === Remediation script ===
# Exported from gporais.com
# Policy: Modèle de zones Sites sensibles
# State: Enabled
# Scope: Computer (HKLM)
# Supported on: Au minimum Internet Explorer 6.0 dans Windows XP avec Service Pack 2 ou Windows Server 2003 avec Service Pack 1
$path = 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Restricted Sites Settings\Template Policies'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'RestrictedSitesZoneTemplate' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'Restricted Sites' -Value 4 -Type DWord
$path = 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4'
# 1001 = (not defined)
# 1004 = (not defined)
# 1200 = (not defined)
# 1201 = (not defined)
# 1206 = (not defined)
# 1207 = (not defined)
# 1208 = (not defined)
# 1209 = (not defined)
# 120a = (not defined)
# 120b = (not defined)
# 120c = (not defined)
# 1400 = (not defined)
# 1402 = (not defined)
# 1405 = (not defined)
# 1406 = (not defined)
# 1407 = (not defined)
# 1409 = (not defined)
# 1601 = (not defined)
# 1604 = (not defined)
# 1605 = (not defined)
# 1606 = (not defined)
# 1607 = (not defined)
# 1608 = (not defined)
# 1609 = (not defined)
# 160A = (not defined)
# 1800 = (not defined)
# 1802 = (not defined)
# 1803 = (not defined)
# 1804 = (not defined)
# 1807 = (not defined)
# 1808 = (not defined)
# 1809 = (not defined)
# 180a = (not defined)
# 180b = (not defined)
# 1a00 = (not defined)
# 1a02 = (not defined)
# 1a03 = (not defined)
# 1a04 = (not defined)
# 1a05 = (not defined)
# 1a06 = (not defined)
# 1c00 = (not defined)
# 1e05 = (not defined)
# 2000 = (not defined)
# 2001 = (not defined)
# 2004 = (not defined)
# 2005 = (not defined)
# 2100 = (not defined)
# 2101 = (not defined)
# 2102 = (not defined)
# 2103 = (not defined)
# 2104 = (not defined)
# 2105 = (not defined)
# 2106 = (not defined)
# 2200 = (not defined)
# 2201 = (not defined)
# 2300 = (not defined)
# 2301 = (not defined)
# 2400 = (not defined)
# 2401 = (not defined)
# 2402 = (not defined)
# 2500 = (not defined)
# 2600 = (not defined)
# 2700 = (not defined) Vous construisez une collection multi-paramètres ? Ajoutez ce paramètre et générez des exports combinés (.reg, PowerShell, GPO).