Skip to content

Instantly share code, notes, and snippets.

@p0w3rsh3ll
Last active March 16, 2017 02:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save p0w3rsh3ll/9ac01b008bc4f04462280b4de3175389 to your computer and use it in GitHub Desktop.
Save p0w3rsh3ll/9ac01b008bc4f04462280b4de3175389 to your computer and use it in GitHub Desktop.
# Disable the DiagTrack service
Get-Service DiagTrack |
Stop-Service -Verbose -PassThru |
Set-Service -StartupType Disabled -Verbose
# Disable compattelrunner.exe launched by scheduled tasks
'Microsoft Compatibility Appraiser',
'ProgramDataUpdater' | ForEach-Object {
Get-ScheduledTask -TaskName $_ -TaskPath '\Microsoft\Windows\Application Experience\' |
Disable-ScheduledTask
}
# Stop and remove Diagtrack ETL trace session under
# C:\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger\
Get-EtwTraceSession |
Where Name -match '(AutoLogger-)?Diagtrack-Listener'|
Remove-EtwTraceSession
del C:\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl -ErrorAction SilentlyContinue
# Disable the Autologger session at the next computer restart
Set-AutologgerConfig -Name 'AutoLogger-Diagtrack-Listener' -Start 0
# Other idea: block the diagtrack service at firewall level
New-NetFirewallRule -Name "Block DiagTrack" -Profile Any -Direction Outbound -Action Block -Service DiagTrack -DisplayName "Block DiagTrack"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment