Azure Log Analytics for Windows Telemetry data
I blogged about this last year here
As best practice, the Upgrade Analytics script checks for far more than just injecting the workspace key and telemetry value.
FYI - This could also be managed in an SCCM Compliance setting.
Paul Fitzgerald - Platform PFE blogged about a non SCCM method here
Assess requirements for environment:
Barebones configuration requires Commercial ID, allow telemetry, and level of telemetry data to send
Optional - Create key for IEDataOptIn
Send data to Application Insights
Customer proxy setup
Script has 11 parameters specified, not all are needed (excerpt below from script)
Param(
# run mode (Deployment or Pilot)
[Parameter(Mandatory=$true, Position=1)]
[string]$runMode,
# File share to store logs
[Parameter(Mandatory=$true, Position=2)]
[string]$logPath,
# Commercial ID provided to you
[Parameter(Mandatory=$true, Position=3)]
[string]$commercialIDValue,
# logMode == 0 log to console only
# logMode == 1 log to file and console
# logMode == 2 log to file only
[Parameter(Mandatory=$true, Position=4)]
[string]$logMode,
#To enable IE data, set AllowIEData=IEDataOptIn and set IEOptInLevel
[Parameter(Position=5)]
[string]$AllowIEData,
#IEOptInLevel = 0 Internet Explorer data collection is disabled
#IEOptInLevel = 1 Data collection is enabled for sites in the Local intranet + Trusted sites + Machine local zones
#IEOptInLevel = 2 Data collection is enabled for sites in the Internet + Restricted sites zones
#IEOptInLevel = 3 Data collection is enabled for all sites
[Parameter(Position=6)]
[string]$IEOptInLevel,
[Parameter(Position=7)]
[string]$AppInsightsOptIn,
[Parameter(Position=8)]
[string]$NoOfAppraiserRetries = 30,
[Parameter(Position=9)]
[string]$ClientProxy = "Direct",
[Parameter(Position=10)]
[int]$HKCUProxyEnable,
[Parameter(Position=11)]
[string]$HKCUProxyServer
Simple method to update machines to send Windows telemetry data:
PowerShell script
From PowerShell as Administrator
Set-Location HKLM:
$registryPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies"
$Name = "DataCollection"
$Name2 = "AllowTelemetry"
$CommercialID = "00000000-0000-0000-0000-000000000000"
$value = "2" # Values from 0-3 accepted
$vIEDataOptInPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection"
$IEOptInLevel = "2" # Values from 0-3 accepted
If ( (Test-Path $registryPath\$Name) ) { write-host -f green "Registry keys already exist" }
If ( ! (Test-Path $registryPath\$Name) )
{
New-ItemProperty -Path $registryPath -Name $name
New-ItemProperty -Path $registryPath -Name $CommercialID
New-ItemProperty -Path $vIEDataOptInPath -Name IEDataOptIn -Type DWord -Value $IEOptInLevel
New-ItemProperty -Path $registryPath\$Name -Name $name2 -Value $value `
-PropertyType DWORD -Force | Out-Null
Write-host -f green "Registry keys added for Telemetry"
}
References
Configure telemetry
Get Started link
Win 7,8 Opt in link