feat(telemetry): disable telemetry-related scheduled tasks under Microsoft\Windows (#615)

Co-authored-by: Jeffrey <9938813+Raphire@users.noreply.github.com>
This commit is contained in:
HetCreep
2026-06-21 00:04:46 +07:00
committed by GitHub
parent 535b62db40
commit 6e4a616f1c
4 changed files with 140 additions and 7 deletions

View File

@@ -26,6 +26,10 @@ function ExecuteParameter {
# Also remove the app package for Copilot
RemoveApps @('Microsoft.Copilot')
}
'DisableTelemetry' {
# Also disable telemetry scheduled tasks
Disable-TelemetryScheduledTasks
}
}
return
}
@@ -245,9 +249,9 @@ function ExecuteAllChanges {
if ($f -and $f.RegistryUndoKey) {
ImportRegistryFile "> $applyUndoText" (Resolve-UndoRegFilePath $f.RegistryUndoKey)
} else {
Invoke-UndoFeatureAction -FeatureId $featureId
}
Invoke-UndoFeatureAction -FeatureId $featureId
}
if ($script:RegistryImportFailures -gt 0) {
@@ -302,9 +306,9 @@ function Invoke-UndoFeatureAction {
Write-Host ""
return
}
default {
Write-Host "> No undo action defined for $FeatureId, skipping..." -ForegroundColor Yellow
Write-Host ""
'DisableTelemetry' {
# Also re-enable telemetry scheduled tasks
Enable-TelemetryScheduledTasks
return
}
}