Spécifier le service source pour des classes spécifiques de mises à jour Windows
Vérifié avec Windows 11 25H2 — mis à jour le 12 juillet 2026
Pris en charge sur : Au minimum Windows Server 2022 ou Windows 10 version 2004
Chemin dans la console GPO
Configuration ordinateur\Modèles d'administration\Composants Windows\Windows Update\Gérer les mises à jour proposées de Windows Server Update Service Description
Lorsque cette stratégie est activée, les appareils reçoivent les mises à jour Windows pour les classes répertoriées à partir de la source de mise à jour spécifiée : Windows Update ou le service de mise à jour Windows Server. Remarque : pour recevoir des mises à jour à partir du service de mise à jour de Windows Server, vous devez avoir configuré correctement un emplacement intranet du service de mise à jour Microsoft à l’aide de la stratégie « Spécifier l’emplacement intranet du service de mise à jour Microsoft ». Si cette stratégie n’est pas configurée ou si elle est désactivée, l’appareil continue de détecter les mises à jour par vos autres configurations de stratégie. Remarque : Si vous utilisez « Ne pas autoriser les stratégies de report pour créer des analyses sur Windows Update » pour vérifier que les appareils n’effectuent une analyse que sur votre serveur spécifié, nous vous recommandons de configurer cette stratégie à la place ou en supplément.
Registre
Software\Policies\Microsoft\Windows\WindowsUpdate Cette stratégie définit plusieurs valeurs de registre :
UseUpdateClassPolicySource AU UseUpdateClassPolicySource = 1 UseUpdateClassPolicySource = 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. ⓘ
Fichier .reg
Windows Registry Editor Version 5.00
; Exported from gporais.com
; Policy: Spécifier le service source pour des classes spécifiques de mises à jour Windows
; State: Enabled
; Supported on: Au minimum Windows Server 2022 ou Windows 10 version 2004
[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU]
"UseUpdateClassPolicySource"=dword:00000001
[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate]
"SetPolicyDrivenUpdateSourceForFeatureUpdates"=dword:00000001
"SetPolicyDrivenUpdateSourceForQualityUpdates"=dword:00000001
"SetPolicyDrivenUpdateSourceForDriverUpdates"=dword:00000001
"SetPolicyDrivenUpdateSourceForOtherUpdates"=dword:00000001 Autres formats (PowerShell, Intune, SCCM)
PowerShell
# Exported from gporais.com
# Policy: Spécifier le service source pour des classes spécifiques de mises à jour Windows
# State: Enabled
# Supported on: Au minimum Windows Server 2022 ou Windows 10 version 2004
$path = 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate\AU'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'UseUpdateClassPolicySource' -Value 1 -Type DWord
$path = 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'SetPolicyDrivenUpdateSourceForFeatureUpdates' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'SetPolicyDrivenUpdateSourceForQualityUpdates' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'SetPolicyDrivenUpdateSourceForDriverUpdates' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'SetPolicyDrivenUpdateSourceForOtherUpdates' -Value 1 -Type DWord Intune XML
Aucune correspondance directe Policy CSP / OMA-URI pour cette stratégie. Utilisez l'onglet Intune Remediation, ou importez l'ADMX dans Intune. Intune Remediation
# === Detection script ===
# Exported from gporais.com
# Policy: Spécifier le service source pour des classes spécifiques de mises à jour Windows
# State: Enabled
# Supported on: Au minimum Windows Server 2022 ou Windows 10 version 2004
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
}
$checks = @(
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate\AU' -Name 'UseUpdateClassPolicySource' -Expected 1 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'SetPolicyDrivenUpdateSourceForFeatureUpdates' -Expected 1 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'SetPolicyDrivenUpdateSourceForQualityUpdates' -Expected 1 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'SetPolicyDrivenUpdateSourceForDriverUpdates' -Expected 1 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'SetPolicyDrivenUpdateSourceForOtherUpdates' -Expected 1 -Kind DWord)
)
if ($checks -notcontains $false) {
Write-Output 'Compliant'
exit 0
}
Write-Output 'Non-compliant'
exit 1
# === Remediation script ===
# Exported from gporais.com
# Policy: Spécifier le service source pour des classes spécifiques de mises à jour Windows
# State: Enabled
# Supported on: Au minimum Windows Server 2022 ou Windows 10 version 2004
$path = 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate\AU'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'UseUpdateClassPolicySource' -Value 1 -Type DWord
$path = 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'SetPolicyDrivenUpdateSourceForFeatureUpdates' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'SetPolicyDrivenUpdateSourceForQualityUpdates' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'SetPolicyDrivenUpdateSourceForDriverUpdates' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'SetPolicyDrivenUpdateSourceForOtherUpdates' -Value 1 -Type DWord Scripts SCCM
# Exported from gporais.com
# Policy: Spécifier le service source pour des classes spécifiques de mises à jour Windows
# State: Enabled
# Supported on: Au minimum Windows Server 2022 ou Windows 10 version 2004
# 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: Spécifier le service source pour des classes spécifiques de mises à jour Windows
# State: Enabled
# Supported on: Au minimum Windows Server 2022 ou Windows 10 version 2004
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
}
$checks = @(
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate\AU' -Name 'UseUpdateClassPolicySource' -Expected 1 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'SetPolicyDrivenUpdateSourceForFeatureUpdates' -Expected 1 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'SetPolicyDrivenUpdateSourceForQualityUpdates' -Expected 1 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'SetPolicyDrivenUpdateSourceForDriverUpdates' -Expected 1 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'SetPolicyDrivenUpdateSourceForOtherUpdates' -Expected 1 -Kind DWord)
)
if ($checks -notcontains $false) {
Write-Output 'Compliant'
exit 0
}
Write-Output 'Non-compliant'
exit 1
# === Remediation script ===
# Exported from gporais.com
# Policy: Spécifier le service source pour des classes spécifiques de mises à jour Windows
# State: Enabled
# Supported on: Au minimum Windows Server 2022 ou Windows 10 version 2004
$path = 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate\AU'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'UseUpdateClassPolicySource' -Value 1 -Type DWord
$path = 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'SetPolicyDrivenUpdateSourceForFeatureUpdates' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'SetPolicyDrivenUpdateSourceForQualityUpdates' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'SetPolicyDrivenUpdateSourceForDriverUpdates' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'SetPolicyDrivenUpdateSourceForOtherUpdates' -Value 1 -Type DWord Vous construisez une collection multi-paramètres ? Ajoutez ce paramètre et générez des exports combinés (.reg, PowerShell, GPO).