Open in the explorer

Limit profile size

Limiter la taille du profil

Type
User
GPO path
User Configuration › Policies › Administrative Templates › System › User Profiles FR: Configuration utilisateur › Stratégies › Modèles d'administration › Système › Profils utilisateur
Supported on
At least Windows 2000 FR: Au minimum Windows 2000
ADMX file
UserProfiles.admx
Internal name
UserProfiles/LimitSize

Explanation

This policy setting sets the maximum size of each user profile and determines the system's response when a user profile reaches the maximum size. This policy setting affects both local and roaming profiles.

If you disable this policy setting or do not configure it, the system does not limit the size of user profiles.

If you enable this policy setting, you can:

-- Set a maximum permitted user profile size.
-- Determine whether the registry files are included in the calculation of the profile size.
-- Determine whether users are notified when the profile exceeds the permitted maximum size.
-- Specify a customized message notifying users of the oversized profile.
-- Determine how often the customized message is displayed.

Note: In operating systems earlier than Microsoft Windows Vista, Windows will not allow users to log off until the profile size has been reduced to within the allowable limit. In Microsoft Windows Vista, Windows will not block users from logging off. Instead, if the user has a roaming user profile, Windows will not synchronize the user's profile with the roaming profile server if the maximum profile size limit specified here is exceeded.

French text from Windows 11 26H2

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.

Registry

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System
Value name
EnableProfileQuota
StateValue written
Enablednot defined in the ADMX (see the options below)
Disablednot 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: UserProfiles/LimitSize
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
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 'EnableProfileQuota' -Value 1 -Type DWord  # assumed value (not defined in the ADMX)
# Custom Message
Set-ItemProperty -Path $k -Name 'ProfileQuotaMessage' -Value '<value>' -Type String
# Max Profile size (KB)
Set-ItemProperty -Path $k -Name 'MaxProfileSize' -Value 30000 -Type DWord  # between 300 and 30000000
# Show registry files in the file list
# value not defined in the ADMX (the GPO editor usually writes 1/0)
# 1 = checked, 0 = unchecked; default state taken from the ADML
Set-ItemProperty -Path $k -Name 'IncludeRegInProQuota' -Value 1 -Type DWord
# Notify user when profile storage space is exceeded.
Set-ItemProperty -Path $k -Name 'WarnUser' -Value 1 -Type DWord  # value not defined in the ADMX; 1 = checked, 0 = unchecked
# Remind user every X minutes
Set-ItemProperty -Path $k -Name 'WarnUserTimeout' -Value 15 -Type DWord

Disable

# Disable: UserProfiles/LimitSize
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
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 'EnableProfileQuota' -Value 0 -Type DWord  # assumed value (not defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": UserProfiles/LimitSize
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
Remove-ItemProperty -Path $k -Name 'EnableProfileQuota' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'ProfileQuotaMessage' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'MaxProfileSize' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'IncludeRegInProQuota' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'WarnUser' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'WarnUserTimeout' -ErrorAction SilentlyContinue

Options (5)

LabelControlRegistry valueREG typeConstraints / details
Custom MessageMessage personnaliséSizeMessageText boxtextProfileQuotaMessageREG_SZ
Default (UI): You have exceeded your profile storage space. Before you can log off, you need to move some items from your profile to network or local storage.
Max Profile size (KB)Taille maximale du profil (Ko)ProfileSizeNumeric boxdecimalMaxProfileSizeREG_DWORD
Required · Min: 300 · Max: 30000000 · Default (UI): 30000
Show registry files in the file listAfficher les fichiers du Registre dans la liste de fichiersIncludeRegInProQuotaCheck boxbooleanIncludeRegInProQuotaREG_DWORD
Checked: implicit: 1
Unchecked: implicit: 0
Notify user when profile storage space is exceeded.Avertir l’utilisateur quand l’espace de stockage pour le profil est dépassé.WarnUserCheck boxbooleanWarnUserREG_DWORD
Checked: implicit: 1
Unchecked: implicit: 0
Remind user every X minutes:Effectuer un rappel à l’utilisateur toutes les X minutes :WarnUserTimeoutNumeric boxdecimalWarnUserTimeoutREG_DWORD
Required · Default (UI): 15

Availability