Open PowerShell as Administator.
In the elevated PowerShell window, copy and paste the following command, all at once, and hit Enter to run it. $path = "HKLM:SOFTWAREMicrosoftWindowsCurrentVersionPoliciesDataCollection"
# Telemetry level: 1 - basic, 3 - full
$value = "3"
New-ItemProperty -Path $path -Name AllowTelemetry -Value $value -Type Dword -Force
New-ItemProperty -Path $path -Name MaxTelemetryAllowed -Value $value -Type Dword -Force
Restart the OS.