Limiter la taille du profil
Vérifié avec Windows 11 25H2 — mis à jour le 30 juillet 2026
Pris en charge sur : Au minimum Windows 2000
Chemin dans la console GPO
Configuration utilisateur\Modèles d'administration\Système\Profils utilisateur Description
Ce paramètre de stratégie définit la taille maximale de chaque profil utilisateur et détermine la réponse du système lorsqu’un utilisateur atteint la taille maximale. Ce paramètre de stratégie affecte le profil local et le profil itinérant. Si vous désactivez ce paramètre de stratégie ou ne le configurez pas, le système ne limite pas la taille des profils utilisateur. Si vous activez ce paramètre, vous pouvez effectuer les actions suivantes : -- définir une taille maximale autorisée pour le profil de l’utilisateur ; -- déterminer si les fichiers du Registre sont inclus dans le calcul de la taille de profil ; -- déterminer si les utilisateurs sont prévenus quand le profil dépasse la taille maximale autorisée ; -- spécifier un message personnalisé qui prévient les utilisateurs du dépassement de la taille du profil ; -- déterminer la fréquence d’affichage du message personnalisé. Remarque : dans les systèmes d’exploitation antérieurs à Microsoft Windows Vista, Windows n’autorise pas les utilisateurs à fermer une session tant que la taille du profil n’a pas été réduite à une taille autorisée. Dans Microsoft Windows Vista, Windows ne bloque pas la fermeture de session par l’utilisateur. Au lieu de cela, si l’utilisateur a un profil utilisateur itinérant, Windows ne synchronise pas le profil de l’utilisateur avec le serveur de profils itinérants si la limite de taille maximale du profil spécifiée ici est dépassée.
Registre
Software\Microsoft\Windows\CurrentVersion\Policies\System Nom de valeur : EnableProfileQuota
MDM / Intune (CSP)
./User/Vendor/MSFT/Policy/Config/ADMX_UserProfiles/LimitSize 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. ⓘ
Fichier .reg
Windows Registry Editor Version 5.00
; Exported from gporais.com
; Policy: Limiter la taille du profil
; State: Enabled
; Supported on: Au minimum Windows 2000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System]
"EnableProfileQuota"=dword:00000001
"ProfileQuotaMessage"=""
"MaxProfileSize"=dword:00007530
"IncludeRegInProQuota"=dword:00000000
"WarnUser"=dword:00000000
"WarnUserTimeout"=dword:0000000f Autres formats (PowerShell, Intune, SCCM)
PowerShell
# Exported from gporais.com
# Policy: Limiter la taille du profil
# State: Enabled
# Supported on: Au minimum Windows 2000
# Warning: In SYSTEM context (the Intune default), HKCU targets the SYSTEM profile. Run this script using the logged-on credentials.
$path = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'EnableProfileQuota' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'ProfileQuotaMessage' -Value '' -Type String
Set-ItemProperty -Path $path -Name 'MaxProfileSize' -Value 30000 -Type DWord
Set-ItemProperty -Path $path -Name 'IncludeRegInProQuota' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'WarnUser' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'WarnUserTimeout' -Value 15 -Type DWord Intune XML
OMA-URI: ./User/Vendor/MSFT/Policy/Config/ADMX_UserProfiles/LimitSize
Data type: String
Value:
<enabled/>
<data id="SizeMessage" value=""/>
<data id="ProfileSize" value="30000"/>
<data id="IncludeRegInProQuota" value="0"/>
<data id="WarnUser" value="0"/>
<data id="WarnUserTimeout" value="15"/> Intune Remediation
# === Detection script ===
# Exported from gporais.com
# Policy: Limiter la taille du profil
# State: Enabled
# Supported on: Au minimum Windows 2000
# Warning: In SYSTEM context (the Intune default), HKCU targets the SYSTEM profile. Run this script using the logged-on credentials.
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 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'EnableProfileQuota' -Expected 1 -Kind DWord)
(Test-RegistryValue -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'ProfileQuotaMessage' -Expected '' -Kind String)
(Test-RegistryValue -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'MaxProfileSize' -Expected 30000 -Kind DWord)
(Test-RegistryValue -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'IncludeRegInProQuota' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'WarnUser' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'WarnUserTimeout' -Expected 15 -Kind DWord)
)
if ($checks -notcontains $false) {
Write-Output 'Compliant'
exit 0
}
Write-Output 'Non-compliant'
exit 1
# === Remediation script ===
# Exported from gporais.com
# Policy: Limiter la taille du profil
# State: Enabled
# Supported on: Au minimum Windows 2000
# Warning: In SYSTEM context (the Intune default), HKCU targets the SYSTEM profile. Run this script using the logged-on credentials.
$path = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'EnableProfileQuota' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'ProfileQuotaMessage' -Value '' -Type String
Set-ItemProperty -Path $path -Name 'MaxProfileSize' -Value 30000 -Type DWord
Set-ItemProperty -Path $path -Name 'IncludeRegInProQuota' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'WarnUser' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'WarnUserTimeout' -Value 15 -Type DWord Scripts SCCM
# Exported from gporais.com
# Policy: Limiter la taille du profil
# State: Enabled
# Supported on: Au minimum Windows 2000
# 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: Limiter la taille du profil
# State: Enabled
# Supported on: Au minimum Windows 2000
# Warning: In SYSTEM context (the Intune default), HKCU targets the SYSTEM profile. Run this script using the logged-on credentials.
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 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'EnableProfileQuota' -Expected 1 -Kind DWord)
(Test-RegistryValue -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'ProfileQuotaMessage' -Expected '' -Kind String)
(Test-RegistryValue -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'MaxProfileSize' -Expected 30000 -Kind DWord)
(Test-RegistryValue -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'IncludeRegInProQuota' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'WarnUser' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'WarnUserTimeout' -Expected 15 -Kind DWord)
)
if ($checks -notcontains $false) {
Write-Output 'Compliant'
exit 0
}
Write-Output 'Non-compliant'
exit 1
# === Remediation script ===
# Exported from gporais.com
# Policy: Limiter la taille du profil
# State: Enabled
# Supported on: Au minimum Windows 2000
# Warning: In SYSTEM context (the Intune default), HKCU targets the SYSTEM profile. Run this script using the logged-on credentials.
$path = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'EnableProfileQuota' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'ProfileQuotaMessage' -Value '' -Type String
Set-ItemProperty -Path $path -Name 'MaxProfileSize' -Value 30000 -Type DWord
Set-ItemProperty -Path $path -Name 'IncludeRegInProQuota' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'WarnUser' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'WarnUserTimeout' -Value 15 -Type DWord Vous construisez une collection multi-paramètres ? Ajoutez ce paramètre et générez des exports combinés (.reg, PowerShell, GPO).