Allow Diagnostic Data
Verified with Windows 11 25H2 — updated on July 30, 2026
Supported on: At least Windows Server 2016, Windows 10
Path in the GPO console
Computer Configuration\Administrative Templates\Windows Components\Data Collection and Preview Builds User Configuration\Administrative Templates\Windows Components\Data Collection and Preview Builds Description
By configuring this policy setting you can adjust what diagnostic data is collected from Windows. This policy setting also restricts the user from increasing the amount of diagnostic data collection via the Settings app. The diagnostic data collected under this policy impacts the operating system and apps that are considered part of Windows and does not apply to any additional apps installed by your organization. - Diagnostic data off (not recommended). Using this value, no diagnostic data is sent from the device. This value is only supported on Enterprise, Education, and Server editions. - Send required diagnostic data. This is the minimum diagnostic data necessary to keep Windows secure, up to date, and performing as expected. Using this value disables the "Optional diagnostic data" control in the Settings app. - Send optional diagnostic data. Additional diagnostic data is collected that helps us to detect, diagnose and fix issues, as well as make product improvements. Required diagnostic data will always be included when you choose to send optional diagnostic data. Optional diagnostic data can also include diagnostic log files and crash dumps. Use the "Limit Dump Collection" and the "Limit Diagnostic Log Collection" policies for more granular control of what optional diagnostic data is sent. If you disable or do not configure this policy setting, the device will send required diagnostic data and the end user can choose whether to send optional diagnostic data from the Settings app. Note: The "Configure diagnostic data opt-in settings user interface" group policy can be used to prevent end users from changing their data collection settings.
Registry
Software\Policies\Microsoft\Windows\DataCollection Software\Policies\Microsoft\Windows\DataCollection MDM / Intune (CSP)
./Device/Vendor/MSFT/Policy/Config/System/AllowTelemetry ./User/Vendor/MSFT/Policy/Config/System/AllowTelemetry Microsoft Learn documentation Mapping data: Microsoft Learn (CC BY 4.0)
CSP values
-
0- Security. Information that's required to help keep Windows more secure, including data about the Connected User Experience and Telemetry component settings, the Malicious Software Removal Tool, and Windows Defender. | Note: This value is only applicable to Windows 10 Enterprise, Windows 10 Education, Windows 10 Mobile Enterprise, Windows 10 IoT Core (IoT Core), and Windows Server 2016. Using this setting on other devices is equivalent to setting the value of 1. -
1 (Default)- Basic. Basic device info, including: quality-related data, app compatibility, app usage data, and data from the Security level. -
3- Full. All data necessary to identify and help to fix problems, plus data from the Security, Basic, and Enhanced levels.
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. ⓘ
Applying both scopes creates an ambiguous configuration (computer takes precedence over user). Only do this intentionally.
.reg file
Windows Registry Editor Version 5.00
; Exported from gporais.com
; Policy: Allow Diagnostic Data
; State: Enabled
; Scope: Computer (HKLM)
; Supported on: At least Windows Server 2016, Windows 10
[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\DataCollection]
"AllowTelemetry"=dword:00000001 More formats (PowerShell, Intune, SCCM)
PowerShell
# Exported from gporais.com
# Policy: Allow Diagnostic Data
# State: Enabled
# Scope: Computer (HKLM)
# Supported on: At least Windows Server 2016, Windows 10
$path = 'HKLM:\Software\Policies\Microsoft\Windows\DataCollection'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'AllowTelemetry' -Value 1 -Type DWord Intune XML
OMA-URI: ./Device/Vendor/MSFT/Policy/Config/System/AllowTelemetry
Data type: String
Value:
<enabled/>
<data id="AllowTelemetry" value="1"/> Intune Remediation
# === Detection script ===
# Exported from gporais.com
# Policy: Allow Diagnostic Data
# State: Enabled
# Scope: Computer (HKLM)
# Supported on: At least Windows Server 2016, Windows 10
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\DataCollection' -Name 'AllowTelemetry' -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: Allow Diagnostic Data
# State: Enabled
# Scope: Computer (HKLM)
# Supported on: At least Windows Server 2016, Windows 10
$path = 'HKLM:\Software\Policies\Microsoft\Windows\DataCollection'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'AllowTelemetry' -Value 1 -Type DWord SCCM scripts
# Exported from gporais.com
# Policy: Allow Diagnostic Data
# State: Enabled
# Scope: Computer (HKLM)
# Supported on: At least Windows Server 2016, Windows 10
# 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: Allow Diagnostic Data
# State: Enabled
# Scope: Computer (HKLM)
# Supported on: At least Windows Server 2016, Windows 10
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\DataCollection' -Name 'AllowTelemetry' -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: Allow Diagnostic Data
# State: Enabled
# Scope: Computer (HKLM)
# Supported on: At least Windows Server 2016, Windows 10
$path = 'HKLM:\Software\Policies\Microsoft\Windows\DataCollection'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'AllowTelemetry' -Value 1 -Type DWord Building a multi-setting collection? Add this setting and generate combined .reg / PowerShell / GPO scripts.