Allow device name to be sent in Windows diagnostic data
Autoriser l'envoi du nom de l'appareil dans les données de diagnostic Windows
Explanation
This policy allows the device name to be sent to Microsoft as part of Windows diagnostic data.
If you disable or do not configure this policy setting, then device name will not be sent to Microsoft as part of Windows diagnostic data.
Cette stratégie permet d'envoyer le nom de l'appareil à Microsoft dans le cadre des données de diagnostic Windows.
Si vous désactivez ou ne configurez pas ce paramètre de stratégie, le nom de l'appareil n'est pas envoyé à Microsoft dans le cadre des données de diagnostic Windows.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\DataCollection- Value name
AllowDeviceNameInTelemetry
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_DWORD = 0 |
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
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: DataCollection/AllowDeviceNameInDiagnosticData
$k = 'HKLM:\Software\Policies\Microsoft\Windows\DataCollection'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AllowDeviceNameInTelemetry' -Value 1 -Type DWordDisable
# Disable: DataCollection/AllowDeviceNameInDiagnosticData
$k = 'HKLM:\Software\Policies\Microsoft\Windows\DataCollection'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AllowDeviceNameInTelemetry' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": DataCollection/AllowDeviceNameInDiagnosticData
$k = 'HKLM:\Software\Policies\Microsoft\Windows\DataCollection'
Remove-ItemProperty -Path $k -Name 'AllowDeviceNameInTelemetry' -ErrorAction SilentlyContinue