Limit profile size
Verified with Windows 11 25H2 — updated on July 30, 2026
Supported on: At least Windows 2000
Path in the GPO console
User Configuration\Administrative Templates\System\User Profiles Description
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.
Registry
Software\Microsoft\Windows\CurrentVersion\Policies\System Value name: EnableProfileQuota
MDM / Intune (CSP)
./User/Vendor/MSFT/Policy/Config/ADMX_UserProfiles/LimitSize Microsoft Learn documentation Mapping data: Microsoft Learn (CC BY 4.0)
Export Builder
BETAConfigure the state, scope and options, then generate .reg, PowerShell, Intune and SCCM outputs — or add the setting to a multi-setting collection.
These exports write the registry — this is not a managed GPO. ⓘ
.reg file
Windows Registry Editor Version 5.00
; Exported from gporais.com
; Policy: Limit profile size
; State: Enabled
; Supported on: At least 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 More formats (PowerShell, Intune, SCCM)
PowerShell
# Exported from gporais.com
# Policy: Limit profile size
# State: Enabled
# Supported on: At least 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: Limit profile size
# State: Enabled
# Supported on: At least 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: Limit profile size
# State: Enabled
# Supported on: At least 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 SCCM scripts
# Exported from gporais.com
# Policy: Limit profile size
# State: Enabled
# Supported on: At least 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: Limit profile size
# State: Enabled
# Supported on: At least 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: Limit profile size
# State: Enabled
# Supported on: At least 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 Building a multi-setting collection? Add this setting and generate combined .reg / PowerShell / GPO scripts.